tgbot-cpp
TgBot::MessageEntity Class Reference

#include <MessageEntity.h>

Public Types

typedef std::shared_ptr< MessageEntityPtr
 

Public Attributes

std::string type
 
int32_t offset
 
int32_t length
 
std::string url
 
User::Ptr user
 

Detailed Description

This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.

Definition at line 18 of file MessageEntity.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<MessageEntity> TgBot::MessageEntity::Ptr

Definition at line 20 of file MessageEntity.h.

Member Data Documentation

◆ length

int32_t TgBot::MessageEntity::length

Length of the entity in UTF-16 code units

Definition at line 35 of file MessageEntity.h.

◆ offset

int32_t TgBot::MessageEntity::offset

Offset in UTF-16 code units to the start of the entity.

Definition at line 30 of file MessageEntity.h.

◆ type

std::string TgBot::MessageEntity::type

Type of the entity. One of mention (), hashtag, bot_command, url, email, bold (bold text), italic (italic text), code (monowidth string), pre (monowidth block), text_link (for clickable text URLs).

Definition at line 25 of file MessageEntity.h.

◆ url

std::string TgBot::MessageEntity::url

Optional. For “text_link” only, url that will be opened after user taps on the text

Definition at line 40 of file MessageEntity.h.

◆ user

User::Ptr TgBot::MessageEntity::user

Optional. For “text_mention” only, the mentioned user

Definition at line 45 of file MessageEntity.h.


The documentation for this class was generated from the following file: