tgbot-cpp
TgBot::Message Class Reference

This object represents a message. More...

#include <Message.h>

Public Types

typedef std::shared_ptr< MessagePtr
 

Public Member Functions

 Message ()
 

Public Attributes

int32_t messageId
 Unique message identifier. More...
 
User::Ptr from
 Optional. Sender, can be empty for messages sent to channels. More...
 
int32_t date
 Date the message was sent in Unix time. More...
 
Chat::Ptr chat
 Conversation the message belongs to. More...
 
User::Ptr forwardFrom
 Optional. For forwarded messages, sender of the original message. More...
 
Chat::Ptr forwardFromChat
 Optional. For messages forwarded from a channel, information about the original channel. More...
 
int32_t forwardFromMessageId
 Optional. For forwarded channel posts, identifier of the original message in the channel. More...
 
std::string forwardSignature
 Optional. For messages forwarded from channels, signature of the post author if present. More...
 
int32_t forwardDate
 Optional. For forwarded messages, date the original message was sent in Unix time. More...
 
Message::Ptr replyToMessage
 Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. More...
 
int32_t editDate
 Optional. Date the message was last edited in Unix time. More...
 
std::string authorSignature
 Optional. Signature of the post author for messages in channels. More...
 
std::string text
 Optional. For text messages, the actual UTF-8 text of the message. More...
 
std::vector< MessageEntity::Ptrentities
 Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text. More...
 
std::vector< MessageEntity::PtrcaptionEntities
 Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption. More...
 
Audio::Ptr audio
 Optional. Message is an audio file, information about the file. More...
 
Document::Ptr document
 Optional. Message is a general file, information about the file. More...
 
Game::Ptr game
 Optional. Message is a game, information about the game. More...
 
std::vector< PhotoSize::Ptrphoto
 Optional. Message is a photo, available sizes of the photo. More...
 
Sticker::Ptr sticker
 Optional. Message is a sticker, information about the sticker. More...
 
Video::Ptr video
 Optional. Message is a video, information about the video. More...
 
Voice::Ptr voice
 Optional. Message is a voice message, information about the file. More...
 
std::string caption
 Optional. Caption for the document, photo or video, 0-200 characters. More...
 
Contact::Ptr contact
 Optional. Message is a shared contact, information about the contact. More...
 
Location::Ptr location
 Optional. Message is a shared location, information about the location. More...
 
Venue::Ptr venue
 Optional. Message is a venue, information about the venue. More...
 
User::Ptr newChatMember
 Optional. A new member was added to the group, information about them (this member may be bot itself). More...
 
std::vector< User::PtrnewChatMembers
 Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) More...
 
User::Ptr leftChatMember
 Optional. A member was removed from the group, information about them (this member may be bot itself). More...
 
std::string newChatTitle
 Optional. A group title was changed to this value. More...
 
std::vector< PhotoSize::PtrnewChatPhoto
 Optional. A group photo was change to this value. More...
 
bool deleteChatPhoto
 Optional. Informs that the group photo was deleted. More...
 
bool groupChatCreated
 Optional. Informs that the group has been created. More...
 
bool supergroupChatCreated
 Optional. Service message: the supergroup has been created. More...
 
bool channelChatCreated
 Optional. Service message: the channel has been created. More...
 
int64_t migrateToChatId
 Optional. The group has been migrated to a supergroup with the specified identifier, not exceeding 1e13 by absolute value. More...
 
int64_t migrateFromChatId
 Optional. The supergroup has been migrated from a group with the specified identifier, not exceeding 1e13 by absolute value. More...
 
Message::Ptr pinnedMessage
 Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply. More...
 
std::string connectedWebsite
 Optional. The domain name of the website on which the user has logged in. More...
 

Detailed Description

This object represents a message.

Definition at line 52 of file Message.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 54 of file Message.h.

Constructor & Destructor Documentation

◆ Message()

TgBot::Message::Message ( )
inline

Definition at line 56 of file Message.h.

Member Data Documentation

◆ audio

Audio::Ptr TgBot::Message::audio

Optional. Message is an audio file, information about the file.

Definition at line 143 of file Message.h.

◆ authorSignature

std::string TgBot::Message::authorSignature

Optional. Signature of the post author for messages in channels.

Definition at line 123 of file Message.h.

◆ caption

std::string TgBot::Message::caption

Optional. Caption for the document, photo or video, 0-200 characters.

Definition at line 178 of file Message.h.

◆ captionEntities

std::vector<MessageEntity::Ptr> TgBot::Message::captionEntities

Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption.

Definition at line 138 of file Message.h.

◆ channelChatCreated

bool TgBot::Message::channelChatCreated

Optional. Service message: the channel has been created.

Definition at line 238 of file Message.h.

◆ chat

Chat::Ptr TgBot::Message::chat

Conversation the message belongs to.

Definition at line 83 of file Message.h.

◆ connectedWebsite

std::string TgBot::Message::connectedWebsite

Optional. The domain name of the website on which the user has logged in.

Definition at line 258 of file Message.h.

◆ contact

Contact::Ptr TgBot::Message::contact

Optional. Message is a shared contact, information about the contact.

Definition at line 183 of file Message.h.

◆ date

int32_t TgBot::Message::date

Date the message was sent in Unix time.

Definition at line 78 of file Message.h.

◆ deleteChatPhoto

bool TgBot::Message::deleteChatPhoto

Optional. Informs that the group photo was deleted.

Definition at line 223 of file Message.h.

◆ document

Document::Ptr TgBot::Message::document

Optional. Message is a general file, information about the file.

Definition at line 148 of file Message.h.

◆ editDate

int32_t TgBot::Message::editDate

Optional. Date the message was last edited in Unix time.

Definition at line 118 of file Message.h.

◆ entities

std::vector<MessageEntity::Ptr> TgBot::Message::entities

Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text.

Definition at line 133 of file Message.h.

◆ forwardDate

int32_t TgBot::Message::forwardDate

Optional. For forwarded messages, date the original message was sent in Unix time.

Definition at line 108 of file Message.h.

◆ forwardFrom

User::Ptr TgBot::Message::forwardFrom

Optional. For forwarded messages, sender of the original message.

Definition at line 88 of file Message.h.

◆ forwardFromChat

Chat::Ptr TgBot::Message::forwardFromChat

Optional. For messages forwarded from a channel, information about the original channel.

Definition at line 93 of file Message.h.

◆ forwardFromMessageId

int32_t TgBot::Message::forwardFromMessageId

Optional. For forwarded channel posts, identifier of the original message in the channel.

Definition at line 98 of file Message.h.

◆ forwardSignature

std::string TgBot::Message::forwardSignature

Optional. For messages forwarded from channels, signature of the post author if present.

Definition at line 103 of file Message.h.

◆ from

User::Ptr TgBot::Message::from

Optional. Sender, can be empty for messages sent to channels.

Definition at line 73 of file Message.h.

◆ game

Game::Ptr TgBot::Message::game

Optional. Message is a game, information about the game.

Definition at line 153 of file Message.h.

◆ groupChatCreated

bool TgBot::Message::groupChatCreated

Optional. Informs that the group has been created.

Definition at line 228 of file Message.h.

◆ leftChatMember

User::Ptr TgBot::Message::leftChatMember

Optional. A member was removed from the group, information about them (this member may be bot itself).

Definition at line 208 of file Message.h.

◆ location

Location::Ptr TgBot::Message::location

Optional. Message is a shared location, information about the location.

Definition at line 188 of file Message.h.

◆ messageId

int32_t TgBot::Message::messageId

Unique message identifier.

Definition at line 68 of file Message.h.

◆ migrateFromChatId

int64_t TgBot::Message::migrateFromChatId

Optional. The supergroup has been migrated from a group with the specified identifier, not exceeding 1e13 by absolute value.

Definition at line 248 of file Message.h.

◆ migrateToChatId

int64_t TgBot::Message::migrateToChatId

Optional. The group has been migrated to a supergroup with the specified identifier, not exceeding 1e13 by absolute value.

Definition at line 243 of file Message.h.

◆ newChatMember

User::Ptr TgBot::Message::newChatMember

Optional. A new member was added to the group, information about them (this member may be bot itself).

Definition at line 198 of file Message.h.

◆ newChatMembers

std::vector<User::Ptr> TgBot::Message::newChatMembers

Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)

Definition at line 203 of file Message.h.

◆ newChatPhoto

std::vector<PhotoSize::Ptr> TgBot::Message::newChatPhoto

Optional. A group photo was change to this value.

Definition at line 218 of file Message.h.

◆ newChatTitle

std::string TgBot::Message::newChatTitle

Optional. A group title was changed to this value.

Definition at line 213 of file Message.h.

◆ photo

std::vector<PhotoSize::Ptr> TgBot::Message::photo

Optional. Message is a photo, available sizes of the photo.

Definition at line 158 of file Message.h.

◆ pinnedMessage

Message::Ptr TgBot::Message::pinnedMessage

Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.

Definition at line 253 of file Message.h.

◆ replyToMessage

Message::Ptr TgBot::Message::replyToMessage

Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.

Definition at line 113 of file Message.h.

◆ sticker

Sticker::Ptr TgBot::Message::sticker

Optional. Message is a sticker, information about the sticker.

Definition at line 163 of file Message.h.

◆ supergroupChatCreated

bool TgBot::Message::supergroupChatCreated

Optional. Service message: the supergroup has been created.

Definition at line 233 of file Message.h.

◆ text

std::string TgBot::Message::text

Optional. For text messages, the actual UTF-8 text of the message.

Definition at line 128 of file Message.h.

◆ venue

Venue::Ptr TgBot::Message::venue

Optional. Message is a venue, information about the venue.

Definition at line 193 of file Message.h.

◆ video

Video::Ptr TgBot::Message::video

Optional. Message is a video, information about the video.

Definition at line 168 of file Message.h.

◆ voice

Voice::Ptr TgBot::Message::voice

Optional. Message is a voice message, information about the file.

Definition at line 173 of file Message.h.


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