61 struct ChecklistTasksDone;
62 struct ChecklistTasksAdded;
63 struct GiveawayCompleted;
64 struct SuggestedPostApproved;
65 struct SuggestedPostApprovalFailed;
66 struct SuggestedPostDeclined;
67 struct SuggestedPostPaid;
68 struct SuggestedPostRefunded;
std::variant< Ptr< Message >, Ptr< InaccessibleMessage > > MaybeInaccessibleMessage
This object describes a message that can be inaccessible to the bot. It can be one of.
This object represents a message. https://core.telegram.org/bots/api#message.
std::int64_t migrateToChatId
Optional. The group has been migrated to a supergroup with the specified identifier....
bool channelChatCreated
Optional. Service message: the channel has been created. This field can't be received in a message co...
bool hasMediaSpoiler
Optional. True, if the message media is covered by a spoiler animation.
Ptr< MessageOrigin > forwardOrigin
Optional. Information about the original message for forwarded messages.
std::vector< Ptr< MessageEntity > > entities
Optional. For text messages, special entities like usernames, URLs, bot commands, etc....
Ptr< VideoChatStarted > videoChatStarted
Optional. Service message: video chat started.
Ptr< SuggestedPostApproved > suggestedPostApproved
Optional. Service message: a suggested post was approved.
Ptr< DirectMessagePriceChanged > directMessagePriceChanged
Optional. Service message: the price for paid messages in the corresponding direct messages chat of a...
Ptr< Sticker > sticker
Optional. Message is a sticker, information about the sticker.
std::vector< Ptr< MessageEntity > > captionEntities
Optional. For messages with a caption, special entities like usernames, URLs, bot commands,...
std::string connectedWebsite
Optional. The domain name of the website on which the user has logged in. about Telegram Login » http...
Ptr< ChecklistTasksDone > checklistTasksDone
Optional. Service message: some tasks in a checklist were marked as done or not done.
Ptr< ExternalReplyInfo > externalReply
Optional. Information about the message that is being replied to, which may come from another chat or...
Message(const nl::json &json)
Ptr< SuggestedPostRefunded > suggestedPostRefunded
Optional. Service message: payment for a suggested post was refunded.
std::int32_t messageThreadId
Optional. Unique identifier of a message thread to which the message belongs; for supergroups only.
std::int32_t messageId
Unique message identifier inside this chat.
bool isFromOffline
Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting ...
Ptr< SuggestedPostApprovalFailed > suggestedPostApprovalFailed
Optional. Service message: approval of a suggested post has failed.
Ptr< User > leftChatMember
Optional. A member was removed from the group, information about them (this member may be the bot its...
Ptr< GiftInfo > gift
Optional. Service message: a regular gift was sent or received.
bool isTopicMessage
Optional. True, if the message is sent to a forum topic.
std::vector< Ptr< PhotoSize > > photo
Optional. Message is a photo, available sizes of the photo.
Ptr< Story > story
Optional. Message is a forwarded story.
std::string authorSignature
Optional. Signature of the post author for messages in channels, or the custom title of an anonymous ...
std::string text
Optional. For text messages, the actual UTF-8 text of the message.
Ptr< Animation > animation
Optional. Message is an animation, information about the animation. For backward compatibility,...
Ptr< ForumTopicClosed > forumTopicClosed
Optional. Service message: forum topic closed.
Ptr< User > senderBusinessBot
Optional. The bot that actually sent the message on behalf of the business account....
Ptr< ForumTopicCreated > forumTopicCreated
Optional. Service message: forum topic created.
Ptr< SuccessfulPayment > successfulPayment
Optional. Message is a service message about a successful payment, information about the payment....
Ptr< User > viaBot
Optional. Bot through which the message was sent.
Ptr< Chat > senderChat
Optional. Sender of the message, sent on behalf of a chat. For example, the channel itself for channe...
std::string mediaGroupId
Optional. The unique identifier of a media message group this message belongs to.
Ptr< VideoChatScheduled > videoChatScheduled
Optional. Service message: video chat scheduled.
std::string newChatTitle
Optional. A chat title was changed to this value.
std::int32_t replyToChecklistTaskId
Optional. Identifier of the specific checklist task that is being replied to.
bool supergroupChatCreated
Optional. Service message: the supergroup has been created. This field can't be received in a message...
Ptr< VideoChatEnded > videoChatEnded
Optional. Service message: video chat ended.
Ptr< GeneralForumTopicHidden > generalForumTopicHidden
Optional. Service message: the 'General' forum topic hidden.
Ptr< GiveawayWinners > giveawayWinners
Optional. A giveaway with public winners was completed.
Ptr< SuggestedPostDeclined > suggestedPostDeclined
Optional. Service message: a suggested post was declined.
std::int32_t senderBoostCount
Optional. If the sender of the message boosted the chat, the number of boosts added by the user.
Ptr< Location > location
Optional. Message is a shared location, information about the location.
Ptr< Document > document
Optional. Message is a general file, information about the file.
Ptr< Invoice > invoice
Optional. Message is an invoice for a payment, information about the invoice. about payments » https:...
Ptr< ChatShared > chatShared
Optional. Service message: a chat was shared with the bot.
Ptr< Video > video
Optional. Message is a video, information about the video.
std::string businessConnectionId
Optional. Unique identifier of the business connection from which the message was received....
Ptr< DirectMessagesTopic > directMessagesTopic
Optional. Information about the direct messages chat topic that contains the message.
Ptr< InlineKeyboardMarkup > replyMarkup
Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url ...
std::string caption
Optional. Caption for the animation, audio, document, photo, video or voice.
Ptr< Message > replyToMessage
Optional. For replies, the original message. Note that the Message object in this field will not cont...
Ptr< ForumTopicEdited > forumTopicEdited
Optional. Service message: forum topic edited.
Ptr< ChatBackground > chatBackgroundSet
Optional. Service message: chat background set.
bool showCaptionAboveMedia
Optional. True, if the caption must be shown above the message media.
std::int64_t paidStarCount
Optional. The number of Telegram Stars that were paid by the sender of the message to send it.
Ptr< SuggestedPostInfo > suggestedPostInfo
Optional. Information about suggested post parameters if the message is a suggested post in a channel...
void fromJson(const nl::json &json)
Deserializes this object from JSON.
Ptr< WebAppData > webAppData
Optional. Service message: data sent by a Web App.
bool isPaidPost
Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours ...
std::int64_t migrateFromChatId
Optional. The supergroup has been migrated from a group with the specified identifier....
Ptr< GiveawayCompleted > giveawayCompleted
Optional. Service message: a giveaway without public winners was completed.
bool isAutomaticForward
Optional. True, if the message is a channel post that was automatically forwarded to the connected di...
Ptr< PassportData > passportData
Optional. Telegram Passport data.
Ptr< LinkPreviewOptions > linkPreviewOptions
Optional. Options used for link preview generation for the message, if it is a text message and link ...
std::string effectId
Optional. Unique identifier of the message effect added to the message.
Ptr< Giveaway > giveaway
Optional. The message is a scheduled giveaway message.
Ptr< RefundedPayment > refundedPayment
Optional. Message is a service message about a refunded payment, information about the payment....
Ptr< GiveawayCreated > giveawayCreated
Optional. Service message: a scheduled giveaway was created.
Ptr< Story > replyToStory
Optional. For replies to a story, the original story.
std::time_t editDate
Optional. Date the message was last edited in Unix time.
MaybeInaccessibleMessage pinnedMessage
Optional. Specified message was pinned. Note that the Message object in this field will not contain f...
Ptr< Contact > contact
Optional. Message is a shared contact, information about the contact.
Ptr< ProximityAlertTriggered > proximityAlertTriggered
Optional. Service message. A user in the chat triggered another user's proximity alert while sharing ...
Ptr< Dice > dice
Optional. Message is a dice with random value.
Ptr< ChecklistTasksAdded > checklistTasksAdded
Optional. Service message: tasks were added to a checklist.
Ptr< MessageAutoDeleteTimerChanged > messageAutoDeleteTimerChanged
Optional. Service message: auto-delete timer settings changed in the chat.
Ptr< Voice > voice
Optional. Message is a voice message, information about the file.
Ptr< UsersShared > usersShared
Optional. Service message: users were shared with the bot.
Ptr< ChatBoostAdded > boostAdded
Optional. Service message: user boosted the chat.
bool groupChatCreated
Optional. Service message: the group has been created.
Ptr< SuggestedPostPaid > suggestedPostPaid
Optional. Service message: payment for a suggested post was received.
Ptr< TextQuote > quote
Optional. For replies that quote part of the original message, the quoted part of the message.
Ptr< User > from
Optional. Sender of the message; empty for messages sent to channels. For backward compatibility,...
Ptr< Poll > poll
Optional. Message is a native poll, information about the poll.
Ptr< VideoChatParticipantsInvited > videoChatParticipantsInvited
Optional. Service message: new participants invited to a video chat.
Ptr< WriteAccessAllowed > writeAccessAllowed
Optional. Service message: the user allowed the bot to write messages after adding it to the attachme...
Ptr< UniqueGiftInfo > uniqueGift
Optional. Service message: a unique gift was sent or received.
Ptr< PaidMessagePriceChanged > paidMessagePriceChanged
Optional. Service message: the price for paid messages has changed in the chat.
Ptr< Venue > venue
Optional. Message is a venue, information about the venue. For backward compatibility,...
bool hasProtectedContent
Optional. True, if the message can't be forwarded.
Ptr< Audio > audio
Optional. Message is an audio file, information about the file.
Ptr< VideoNote > videoNote
Optional. Message is a video note, information about the video message.
nl::json toJson() const
Serializes this object to JSON.
bool deleteChatPhoto
Optional. Service message: the chat photo was deleted.
std::vector< Ptr< PhotoSize > > newChatPhoto
Optional. A chat photo was change to this value.
Ptr< Chat > chat
Conversation the message belongs to.
Ptr< ForumTopicReopened > forumTopicReopened
Optional. Service message: forum topic reopened.
Ptr< Game > game
Optional. Message is a game, information about the game. about games » https://core....
std::time_t date
Date the message was sent in Unix time. It is always a positive number, representing a valid date.
Ptr< GeneralForumTopicUnhidden > generalForumTopicUnhidden
Optional. Service message: the 'General' forum topic unhidden.
Ptr< Checklist > checklist
Optional. Message is a checklist.
std::vector< Ptr< User > > newChatMembers
Optional. New members that were added to the group or supergroup and information about them (the bot ...