tgbot-cpp
Loading...
Searching...
No Matches
Message.h
Go to the documentation of this file.
1#ifndef TGBOT_MESSAGE_H
2#define TGBOT_MESSAGE_H
3
4#include "tgbot/types/User.h"
5#include "tgbot/types/Chat.h"
10#include "tgbot/types/Story.h"
14#include "tgbot/types/Audio.h"
17#include "tgbot/types/Sticker.h"
18#include "tgbot/types/Video.h"
20#include "tgbot/types/Voice.h"
21#include "tgbot/types/Contact.h"
22#include "tgbot/types/Dice.h"
23#include "tgbot/types/Game.h"
24#include "tgbot/types/Poll.h"
25#include "tgbot/types/Venue.h"
28#include "tgbot/types/Invoice.h"
52
53#include <cstdint>
54#include <memory>
55#include <string>
56#include <vector>
57
58namespace TgBot {
59
65class Message {
66
67public:
68 typedef std::shared_ptr<Message> Ptr;
69
73 std::int32_t messageId;
74
78 std::int32_t messageThreadId;
79
86
94
98 std::int32_t senderBoostCount;
99
106
112 std::uint32_t date;
113
120
125
130
135
140
147
152
157
162
167
171 std::uint32_t editDate;
172
177
182
186 std::string mediaGroupId;
187
191 std::string authorSignature;
192
196 std::string text;
197
201 std::vector<MessageEntity::Ptr> entities;
202
207
214
219
224
228 std::vector<PhotoSize::Ptr> photo;
229
234
239
244
249
254
258 std::string caption;
259
263 std::vector<MessageEntity::Ptr> captionEntities;
264
269
274
279
286
291
298
303
307 std::vector<User::Ptr> newChatMembers;
308
313
317 std::string newChatTitle;
318
322 std::vector<PhotoSize::Ptr> newChatPhoto;
323
328
333
341
349
354
361 std::int64_t migrateToChatId;
362
369 std::int64_t migrateFromChatId;
370
377
384
391
396
401
407 std::string connectedWebsite;
408
413
418
425
430
435
440
445
450
455
460
465
470
475
480
485
490
495
500
505
512};
513}
514
515#endif //TGBOT_MESSAGE_H
std::shared_ptr< Animation > Ptr
Definition Animation.h:19
std::shared_ptr< Audio > Ptr
Definition Audio.h:20
std::shared_ptr< ChatBoostAdded > Ptr
std::shared_ptr< Chat > Ptr
Definition Chat.h:31
std::shared_ptr< ChatShared > Ptr
Definition ChatShared.h:21
std::shared_ptr< Contact > Ptr
Definition Contact.h:17
std::shared_ptr< Dice > Ptr
Definition Dice.h:16
std::shared_ptr< Document > Ptr
Definition Document.h:20
std::shared_ptr< ExternalReplyInfo > Ptr
std::shared_ptr< ForumTopicClosed > Ptr
std::shared_ptr< ForumTopicCreated > Ptr
std::shared_ptr< ForumTopicEdited > Ptr
std::shared_ptr< ForumTopicReopened > Ptr
std::shared_ptr< Game > Ptr
Definition Game.h:23
std::shared_ptr< GeneralForumTopicHidden > Ptr
std::shared_ptr< GeneralForumTopicUnhidden > Ptr
std::shared_ptr< GiveawayCompleted > Ptr
std::shared_ptr< GiveawayCreated > Ptr
std::shared_ptr< Giveaway > Ptr
Definition Giveaway.h:21
std::shared_ptr< GiveawayWinners > Ptr
std::shared_ptr< InlineKeyboardMarkup > Ptr
std::shared_ptr< Invoice > Ptr
Definition Invoice.h:19
std::shared_ptr< Location > Ptr
Definition Location.h:17
std::shared_ptr< MessageAutoDeleteTimerChanged > Ptr
This object represents a message.
Definition Message.h:65
WebAppData::Ptr webAppData
Optional. Service message: data sent by a Web App.
Definition Message.h:504
TextQuote::Ptr quote
Optional. For replies that quote part of the original message, the quoted part of the message.
Definition Message.h:156
bool isTopicMessage
Optional. True, if the message is sent to a forum topic.
Definition Message.h:134
std::vector< MessageEntity::Ptr > captionEntities
Optional. For messages with a caption, special entities like usernames, URLs, bot commands,...
Definition Message.h:263
ForumTopicEdited::Ptr forumTopicEdited
Optional. Service message: forum topic edited.
Definition Message.h:439
User::Ptr leftChatMember
Optional. A member was removed from the group, information about them (this member may be the bot its...
Definition Message.h:312
LinkPreviewOptions::Ptr linkPreviewOptions
Optional. Options used for link preview generation for the message, if it is a text message and link ...
Definition Message.h:206
GeneralForumTopicHidden::Ptr generalForumTopicHidden
Optional. Service message: the 'General' forum topic hidden.
Definition Message.h:454
std::int64_t migrateToChatId
Optional. The group has been migrated to a supergroup with the specified identifier.
Definition Message.h:361
std::string caption
Optional. Caption for the animation, audio, document, photo, video or voice.
Definition Message.h:258
Message::Ptr replyToMessage
Optional. For replies in the same chat and message thread, the original message.
Definition Message.h:146
std::string newChatTitle
Optional. A chat title was changed to this value.
Definition Message.h:317
bool deleteChatPhoto
Optional. Service message: the chat photo was deleted.
Definition Message.h:327
std::shared_ptr< Message > Ptr
Definition Message.h:68
Poll::Ptr poll
Optional. Message is a native poll, information about the poll.
Definition Message.h:290
PassportData::Ptr passportData
Optional. Telegram Passport data.
Definition Message.h:417
ForumTopicReopened::Ptr forumTopicReopened
Optional. Service message: forum topic reopened.
Definition Message.h:449
VideoNote::Ptr videoNote
Optional. Message is a video note, information about the video message.
Definition Message.h:248
std::int32_t messageId
Unique message identifier inside this chat.
Definition Message.h:73
std::string mediaGroupId
Optional. The unique identifier of a media message group this message belongs to.
Definition Message.h:186
std::string connectedWebsite
Optional. The domain name of the website on which the user has logged in.
Definition Message.h:407
Voice::Ptr voice
Optional. Message is a voice message, information about the file.
Definition Message.h:253
Animation::Ptr animation
Optional. Message is an animation, information about the animation.
Definition Message.h:213
bool supergroupChatCreated
Optional. Service message: the supergroup has been created.
Definition Message.h:340
GiveawayWinners::Ptr giveawayWinners
Optional. A giveaway with public winners was completed.
Definition Message.h:474
std::int32_t senderBoostCount
Optional. If the sender of the message boosted the chat, the number of boosts added by the user.
Definition Message.h:98
Audio::Ptr audio
Optional. Message is an audio file, information about the file.
Definition Message.h:218
VideoChatParticipantsInvited::Ptr videoChatParticipantsInvited
Optional. Service message: new participants invited to a video chat.
Definition Message.h:499
bool channelChatCreated
Optional. Service message: the channel has been created.
Definition Message.h:348
std::vector< MessageEntity::Ptr > entities
Optional. For text messages, special entities like usernames, URLs, bot commands, etc....
Definition Message.h:201
bool groupChatCreated
Optional. Service message: the group has been created.
Definition Message.h:332
VideoChatStarted::Ptr videoChatStarted
Optional. Service message: video chat started.
Definition Message.h:489
Giveaway::Ptr giveaway
Optional. The message is a scheduled giveaway message.
Definition Message.h:469
std::string authorSignature
Optional. Signature of the post author for messages in channels, or the custom title of an anonymous ...
Definition Message.h:191
bool hasProtectedContent
Optional. True, if the message can't be forwarded.
Definition Message.h:176
GiveawayCompleted::Ptr giveawayCompleted
Optional. Service message: a giveaway without public winners was completed.
Definition Message.h:479
Game::Ptr game
Optional. Message is a game, information about the game.
Definition Message.h:285
UsersShared::Ptr usersShared
Optional. Service message: users were shared with the bot.
Definition Message.h:395
User::Ptr from
Optional. Sender of the message; empty for messages sent to channels.
Definition Message.h:85
std::vector< PhotoSize::Ptr > photo
Optional. Message is a photo, available sizes of the photo.
Definition Message.h:228
bool hasMediaSpoiler
Optional. True, if the message media is covered by a spoiler animation.
Definition Message.h:268
Chat::Ptr chat
Chat the message belongs to.
Definition Message.h:124
Story::Ptr story
Optional. Message is a forwarded story.
Definition Message.h:238
ChatShared::Ptr chatShared
Optional. Service message: a chat was shared with the bot.
Definition Message.h:400
std::int32_t messageThreadId
Optional. Unique identifier of a message thread to which the message belongs; for supergroups only.
Definition Message.h:78
std::int64_t migrateFromChatId
Optional. The supergroup has been migrated from a group with the specified identifier.
Definition Message.h:369
GiveawayCreated::Ptr giveawayCreated
Optional. Service message: a scheduled giveaway was created.
Definition Message.h:464
VideoChatEnded::Ptr videoChatEnded
Optional. Service message: video chat ended.
Definition Message.h:494
User::Ptr viaBot
Optional. Bot through which the message was sent.
Definition Message.h:166
MessageOrigin::Ptr forwardOrigin
Optional. Information about the original message for forwarded messages.
Definition Message.h:129
WriteAccessAllowed::Ptr writeAccessAllowed
Optional. Service message: the user allowed the bot to write messages after adding it to the attachme...
Definition Message.h:412
Story::Ptr replyToStory
Optional. For replies to a story, the original story.
Definition Message.h:161
std::vector< PhotoSize::Ptr > newChatPhoto
Optional. A chat photo was change to this value.
Definition Message.h:322
Message::Ptr pinnedMessage
Optional. Specified message was pinned.
Definition Message.h:376
Venue::Ptr venue
Optional. Message is a venue, information about the venue.
Definition Message.h:297
InlineKeyboardMarkup::Ptr replyMarkup
Optional. Inline keyboard attached to the message.
Definition Message.h:511
SuccessfulPayment::Ptr successfulPayment
Optional. Message is a service message about a successful payment, information about the payment.
Definition Message.h:390
Document::Ptr document
Optional. Message is a general file, information about the file.
Definition Message.h:223
std::uint32_t editDate
Optional. Date the message was last edited in Unix time.
Definition Message.h:171
User::Ptr senderBusinessBot
Optional. The bot that actually sent the message on behalf of the business account.
Definition Message.h:105
bool isAutomaticForward
Optional. True, if the message is a channel post that was automatically forwarded to the connected di...
Definition Message.h:139
Sticker::Ptr sticker
Optional. Message is a sticker, information about the sticker.
Definition Message.h:233
std::vector< User::Ptr > newChatMembers
Optional. New members that were added to the group or supergroup and information about them (the bot ...
Definition Message.h:307
ChatBoostAdded::Ptr boostAdded
Optional. Service message: user boosted the chat.
Definition Message.h:429
Chat::Ptr senderChat
Optional. Sender of the message, sent on behalf of a chat.
Definition Message.h:93
ProximityAlertTriggered::Ptr proximityAlertTriggered
Optional. Service message.
Definition Message.h:424
Dice::Ptr dice
Optional. Message is a dice with random value.
Definition Message.h:278
Video::Ptr video
Optional. Message is a video, information about the video.
Definition Message.h:243
bool isFromOffline
Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting ...
Definition Message.h:181
std::uint32_t date
Date the message was sent in Unix time.
Definition Message.h:112
VideoChatScheduled::Ptr videoChatScheduled
Optional. Service message: video chat scheduled.
Definition Message.h:484
std::string businessConnectionId
Optional. Unique identifier of the business connection from which the message was received.
Definition Message.h:119
GeneralForumTopicUnhidden::Ptr generalForumTopicUnhidden
Optional. Service message: the 'General' forum topic unhidden.
Definition Message.h:459
Contact::Ptr contact
Optional. Message is a shared contact, information about the contact.
Definition Message.h:273
Invoice::Ptr invoice
Optional. Message is an invoice for a payment, information about the invoice.
Definition Message.h:383
ForumTopicCreated::Ptr forumTopicCreated
Optional. Service message: forum topic created.
Definition Message.h:434
ExternalReplyInfo::Ptr externalReply
Optional. Information about the message that is being replied to, which may come from another chat or...
Definition Message.h:151
MessageAutoDeleteTimerChanged::Ptr messageAutoDeleteTimerChanged
Optional. Service message: auto-delete timer settings changed in the chat.
Definition Message.h:353
std::string text
Optional. For text messages, the actual UTF-8 text of the message.
Definition Message.h:196
Location::Ptr location
Optional. Message is a shared location, information about the location.
Definition Message.h:302
ForumTopicClosed::Ptr forumTopicClosed
Optional. Service message: forum topic closed.
Definition Message.h:444
std::shared_ptr< MessageOrigin > Ptr
std::shared_ptr< PassportData > Ptr
std::shared_ptr< Poll > Ptr
Definition Poll.h:22
std::shared_ptr< ProximityAlertTriggered > Ptr
std::shared_ptr< Sticker > Ptr
Definition Sticker.h:22
std::shared_ptr< Story > Ptr
Definition Story.h:19
std::shared_ptr< SuccessfulPayment > Ptr
std::shared_ptr< TextQuote > Ptr
Definition TextQuote.h:21
std::shared_ptr< User > Ptr
Definition User.h:18
std::shared_ptr< UsersShared > Ptr
Definition UsersShared.h:20
std::shared_ptr< Venue > Ptr
Definition Venue.h:18
std::shared_ptr< VideoChatEnded > Ptr
std::shared_ptr< VideoChatParticipantsInvited > Ptr
std::shared_ptr< VideoChatScheduled > Ptr
std::shared_ptr< VideoChatStarted > Ptr
std::shared_ptr< Video > Ptr
Definition Video.h:20
std::shared_ptr< VideoNote > Ptr
Definition VideoNote.h:20
std::shared_ptr< Voice > Ptr
Definition Voice.h:17
std::shared_ptr< WebAppData > Ptr
Definition WebAppData.h:16
std::shared_ptr< WriteAccessAllowed > Ptr
Definition Api.h:40