tgbot-cpp
TgBot::Message Class Reference

#include <Message.h>

Public Types

typedef std::shared_ptr< MessagePtr
 

Public Member Functions

 Message ()
 

Public Attributes

int32_t messageId
 
User::Ptr from
 
int32_t date
 
Chat::Ptr chat
 
User::Ptr forwardFrom
 
Chat::Ptr forwardFromChat
 
int32_t forwardFromMessageId
 
int32_t forwardDate
 
Message::Ptr replyToMessage
 
int32_t editDate
 
std::string text
 
std::vector< MessageEntity::Ptrentities
 
Audio::Ptr audio
 
Document::Ptr document
 
std::vector< PhotoSize::Ptrphoto
 
Sticker::Ptr sticker
 
Video::Ptr video
 
Voice::Ptr voice
 
std::string caption
 
Contact::Ptr contact
 
Location::Ptr location
 
Venue::Ptr venue
 
User::Ptr newChatMember
 
User::Ptr leftChatMember
 
std::string newChatTitle
 
std::vector< PhotoSize::PtrnewChatPhoto
 
bool deleteChatPhoto
 
bool groupChatCreated
 
bool supergroupChatCreated
 
bool channelChatCreated
 
int64_t migrateToChatId
 
int64_t migrateFromChatId
 
Message::Ptr pinnedMessage
 

Detailed Description

This object represents a message.

Definition at line 50 of file Message.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 52 of file Message.h.

Constructor & Destructor Documentation

◆ Message()

TgBot::Message::Message ( )
inline

Definition at line 54 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 126 of file Message.h.

◆ caption

std::string TgBot::Message::caption

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

Definition at line 156 of file Message.h.

◆ channelChatCreated

bool TgBot::Message::channelChatCreated

Optional. Service message: the channel has been created.

Definition at line 211 of file Message.h.

◆ chat

Chat::Ptr TgBot::Message::chat

Conversation the message belongs to.

Definition at line 81 of file Message.h.

◆ contact

Contact::Ptr TgBot::Message::contact

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

Definition at line 161 of file Message.h.

◆ date

int32_t TgBot::Message::date

Date the message was sent in Unix time.

Definition at line 76 of file Message.h.

◆ deleteChatPhoto

bool TgBot::Message::deleteChatPhoto

Optional. Informs that the group photo was deleted.

Definition at line 196 of file Message.h.

◆ document

Document::Ptr TgBot::Message::document

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

Definition at line 131 of file Message.h.

◆ editDate

int32_t TgBot::Message::editDate

Optional. Date the message was last edited in Unix time

Definition at line 111 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 121 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 101 of file Message.h.

◆ forwardFrom

User::Ptr TgBot::Message::forwardFrom

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

Definition at line 86 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 91 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 96 of file Message.h.

◆ from

User::Ptr TgBot::Message::from

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

Definition at line 71 of file Message.h.

◆ groupChatCreated

bool TgBot::Message::groupChatCreated

Optional. Informs that the group has been created.

Definition at line 201 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 181 of file Message.h.

◆ location

Location::Ptr TgBot::Message::location

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

Definition at line 166 of file Message.h.

◆ messageId

int32_t TgBot::Message::messageId

Unique message identifier.

Definition at line 66 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 221 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 216 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 176 of file Message.h.

◆ newChatPhoto

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

Optional. A group photo was change to this value.

Definition at line 191 of file Message.h.

◆ newChatTitle

std::string TgBot::Message::newChatTitle

Optional. A group title was changed to this value.

Definition at line 186 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 136 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 226 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 106 of file Message.h.

◆ sticker

Sticker::Ptr TgBot::Message::sticker

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

Definition at line 141 of file Message.h.

◆ supergroupChatCreated

bool TgBot::Message::supergroupChatCreated

Optional. Service message: the supergroup has been created.

Definition at line 206 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 116 of file Message.h.

◆ venue

Venue::Ptr TgBot::Message::venue

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

Definition at line 171 of file Message.h.

◆ video

Video::Ptr TgBot::Message::video

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

Definition at line 146 of file Message.h.

◆ voice

Voice::Ptr TgBot::Message::voice

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

Definition at line 151 of file Message.h.


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