tgbot-cpp
MessageEntity.h
Go to the documentation of this file.
1 //
2 // Created by Andrea Giove on 17/04/16.
3 //
4 
5 #ifndef TGBOT_MESSAGEENTITY_H
6 #define TGBOT_MESSAGEENTITY_H
7 
8 #include <memory>
9 #include <string>
10 #include "tgbot/types/User.h"
11 
12 namespace TgBot {
13 
20 public:
21  typedef std::shared_ptr<MessageEntity> Ptr;
22 
26  std::string type;
27 
31  int32_t offset;
32 
36  int32_t length;
37 
41  std::string url;
42 
47 };
48 }
49 
50 #endif //TGBOT_MESSAGEENTITY_H
std::shared_ptr< MessageEntity > Ptr
Definition: MessageEntity.h:21
User::Ptr user
Optional. For “text_mention” only, the mentioned user.
Definition: MessageEntity.h:46
Definition: Api.h:47
std::string url
Optional. For “text_link” only, url that will be opened after user taps on the text.
Definition: MessageEntity.h:41
int32_t offset
Offset in UTF-16 code units to the start of the entity.
Definition: MessageEntity.h:31
int32_t length
Length of the entity in UTF-16 code units.
Definition: MessageEntity.h:36
std::string type
Type of the entity. One of mention (), hashtag, bot_command, url, email, bold (bold text)...
Definition: MessageEntity.h:26
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
Definition: MessageEntity.h:19
std::shared_ptr< User > Ptr
Definition: User.h:39