tgbot-cpp
Loading...
Searching...
No Matches
TgBot::Message Struct Reference

This object represents a message. More...

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<Message>

Public Attributes

std::int32_t messageId { }
 Unique message identifier inside this chat; 0 for ephemeral messages. In specific instances (e.g., a message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent.
std::optional< std::int32_t > messageThreadId { }
 Optional. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only.
std::shared_ptr< DirectMessagesTopicdirectMessagesTopic { }
 Optional. Information about the direct messages chat topic that contains the message.
std::shared_ptr< Userfrom { }
 Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats.
std::shared_ptr< ChatsenderChat { }
 Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.
std::optional< std::int32_t > senderBoostCount { }
 Optional. If the sender of the message boosted the chat, the number of boosts added by the user.
std::shared_ptr< UsersenderBusinessBot { }
 Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.
std::optional< std::string > senderTag { }
 Optional. Tag or custom title of the sender of the message; for supergroups only.
std::shared_ptr< UserreceiverUser { }
 Optional. For ephemeral messages, the user who received the message.
std::optional< std::int32_t > ephemeralMessageId { }
 Optional. For ephemeral messages, identifier of the ephemeral message inside this chat. The identifier may be reused for another ephemeral message after the message is deleted or expires.
std::int32_t date { }
 Date the message was sent in Unix time. It is always a positive number, representing a valid date.
std::optional< std::string > guestQueryId { }
 Optional. The unique identifier for the guest query. Use this identifier with the method answerGuestQuery to send a response message. If non-empty, the message belongs to the chat where the guest bot was summoned, which may not coincide with other existing bot chats sharing the same identifier.
std::optional< std::string > businessConnectionId { }
 Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.
std::shared_ptr< Chatchat { }
 Chat the message belongs to.
std::shared_ptr< MessageOriginforwardOrigin { }
 Optional. Information about the original message for forwarded messages.
std::optional< bool > isTopicMessage { }
 Optional. True, if the message is sent to a topic in a forum supergroup or a private chat with the bot.
std::optional< bool > isAutomaticForward { }
 Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group.
std::shared_ptr< MessagereplyToMessage { }
 Optional. For replies in the same chat and message thread, 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. If the message is a reply to an ephemeral message, then this field may be omitted.
std::shared_ptr< ExternalReplyInfoexternalReply { }
 Optional. Information about the message that is being replied to, which may come from another chat or forum topic.
std::shared_ptr< TextQuotequote { }
 Optional. For replies that quote part of the original message, the quoted part of the message.
std::shared_ptr< StoryreplyToStory { }
 Optional. For replies to a story, the original story.
std::optional< std::int32_t > replyToChecklistTaskId { }
 Optional. Identifier of the specific checklist task that is being replied to.
std::optional< std::string > replyToPollOptionId { }
 Optional. Persistent identifier of the specific poll option that is being replied to.
std::shared_ptr< UserviaBot { }
 Optional. Bot through which the message was sent.
std::shared_ptr< UserguestBotCallerUser { }
 Optional. For a message sent by a guest bot, this is the user whose original message triggered the bot's response.
std::shared_ptr< ChatguestBotCallerChat { }
 Optional. For a message sent by a guest bot, this is the chat whose original message triggered the bot's response.
std::optional< std::int32_t > editDate { }
 Optional. Date the message was last edited in Unix time.
std::optional< bool > hasProtectedContent { }
 Optional. True, if the message can't be forwarded.
std::optional< bool > isFromOffline { }
 Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message.
std::optional< bool > isPaidPost { }
 Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited.
std::optional< std::string > mediaGroupId { }
 Optional. The unique identifier inside this chat of a media message group this message belongs to.
std::optional< std::string > authorSignature { }
 Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator.
std::optional< std::int32_t > paidStarCount { }
 Optional. The number of Telegram Stars that were paid by the sender of the message to send it.
std::optional< std::string > text { }
 Optional. For text messages, the actual UTF-8 text of the message.
std::optional< std::vector< std::shared_ptr< MessageEntity > > > entities { }
 Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text.
std::shared_ptr< LinkPreviewOptionslinkPreviewOptions { }
 Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed.
std::shared_ptr< SuggestedPostInfosuggestedPostInfo { }
 Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited.
std::optional< std::string > effectId { }
 Optional. Unique identifier of the message effect added to the message.
std::shared_ptr< RichMessagerichMessage { }
 Optional. Message is a rich formatted message.
std::shared_ptr< Animationanimation { }
 Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set.
std::shared_ptr< Audioaudio { }
 Optional. Message is an audio file, information about the file.
std::shared_ptr< Documentdocument { }
 Optional. Message is a general file, information about the file.
std::shared_ptr< LivePhotolivePhoto { }
 Optional. Message is a live photo, information about the live photo. For backward compatibility, when this field is set, the photo field will also be set.
std::shared_ptr< PaidMediaInfopaidMedia { }
 Optional. Message contains paid media; information about the paid media.
std::optional< std::vector< std::shared_ptr< PhotoSize > > > photo { }
 Optional. Message is a photo, available sizes of the photo.
std::shared_ptr< Stickersticker { }
 Optional. Message is a sticker, information about the sticker.
std::shared_ptr< Storystory { }
 Optional. Message is a forwarded story.
std::shared_ptr< Videovideo { }
 Optional. Message is a video, information about the video.
std::shared_ptr< VideoNotevideoNote { }
 Optional. Message is a video note, information about the video message.
std::shared_ptr< Voicevoice { }
 Optional. Message is a voice message, information about the file.
std::optional< std::string > caption { }
 Optional. Caption for the animation, audio, document, paid media, photo, video or voice.
std::optional< std::vector< std::shared_ptr< MessageEntity > > > captionEntities { }
 Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption.
std::optional< bool > showCaptionAboveMedia { }
 Optional. True, if the caption must be shown above the message media.
std::optional< bool > hasMediaSpoiler { }
 Optional. True, if the message media is covered by a spoiler animation.
std::shared_ptr< Checklistchecklist { }
 Optional. Message is a checklist.
std::shared_ptr< Contactcontact { }
 Optional. Message is a shared contact, information about the contact.
std::shared_ptr< Dicedice { }
 Optional. Message is a dice with random value.
std::shared_ptr< Gamegame { }
 Optional. Message is a game, information about the game. More about games »
std::shared_ptr< Pollpoll { }
 Optional. Message is a native poll, information about the poll.
std::shared_ptr< Venuevenue { }
 Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set.
std::shared_ptr< Locationlocation { }
 Optional. Message is a shared location, information about the location.
std::optional< std::vector< std::shared_ptr< User > > > 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).
std::shared_ptr< UserleftChatMember { }
 Optional. A member was removed from the group, information about them (this member may be the bot itself).
std::shared_ptr< ChatOwnerLeftchatOwnerLeft { }
 Optional. Service message: chat owner has left.
std::shared_ptr< ChatOwnerChangedchatOwnerChanged { }
 Optional. Service message: chat owner has changed.
std::optional< std::string > newChatTitle { }
 Optional. A chat title was changed to this value.
std::optional< std::vector< std::shared_ptr< PhotoSize > > > newChatPhoto { }
 Optional. A chat photo was change to this value.
std::optional< bool > deleteChatPhoto { }
 Optional. Service message: the chat photo was deleted.
std::optional< bool > groupChatCreated { }
 Optional. Service message: the group has been created.
std::optional< bool > supergroupChatCreated { }
 Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
std::optional< bool > channelChatCreated { }
 Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
std::shared_ptr< MessageAutoDeleteTimerChangedmessageAutoDeleteTimerChanged { }
 Optional. Service message: auto-delete timer settings changed in the chat.
std::optional< std::int64_t > migrateToChatId { }
 Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
std::optional< std::int64_t > migrateFromChatId { }
 Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
std::shared_ptr< MaybeInaccessibleMessagepinnedMessage { }
 Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
std::shared_ptr< Invoiceinvoice { }
 Optional. Message is an invoice for a payment, information about the invoice. More about payments »
std::shared_ptr< SuccessfulPaymentsuccessfulPayment { }
 Optional. Message is a service message about a successful payment, information about the payment. More about payments »
std::shared_ptr< RefundedPaymentrefundedPayment { }
 Optional. Message is a service message about a refunded payment, information about the payment. More about payments »
std::shared_ptr< UsersSharedusersShared { }
 Optional. Service message: users were shared with the bot.
std::shared_ptr< ChatSharedchatShared { }
 Optional. Service message: a chat was shared with the bot.
std::shared_ptr< GiftInfogift { }
 Optional. Service message: a regular gift was sent or received.
std::shared_ptr< UniqueGiftInfouniqueGift { }
 Optional. Service message: a unique gift was sent or received.
std::shared_ptr< GiftInfogiftUpgradeSent { }
 Optional. Service message: upgrade of a gift was purchased after the gift was sent.
std::optional< std::string > connectedWebsite { }
 Optional. The domain name of the website on which the user has logged in. More about Telegram Login »
std::shared_ptr< WriteAccessAllowedwriteAccessAllowed { }
 Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.
std::shared_ptr< PassportDatapassportData { }
 Optional. Telegram Passport data.
std::shared_ptr< ProximityAlertTriggeredproximityAlertTriggered { }
 Optional. Service message: a user in the chat triggered another user's proximity alert while sharing Live Location.
std::shared_ptr< ChatBoostAddedboostAdded { }
 Optional. Service message: user boosted the chat.
std::shared_ptr< ChatBackgroundchatBackgroundSet { }
 Optional. Service message: chat background set.
std::shared_ptr< ChecklistTasksDonechecklistTasksDone { }
 Optional. Service message: some tasks in a checklist were marked as done or not done.
std::shared_ptr< ChecklistTasksAddedchecklistTasksAdded { }
 Optional. Service message: tasks were added to a checklist.
std::shared_ptr< CommunityChatAddedcommunityChatAdded { }
 Optional. Service message: chat added to a Community.
std::shared_ptr< CommunityChatRemovedcommunityChatRemoved { }
 Optional. Service message: chat removed from a Community.
std::shared_ptr< DirectMessagePriceChangeddirectMessagePriceChanged { }
 Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed.
std::shared_ptr< ForumTopicCreatedforumTopicCreated { }
 Optional. Service message: forum topic created.
std::shared_ptr< ForumTopicEditedforumTopicEdited { }
 Optional. Service message: forum topic edited.
std::shared_ptr< ForumTopicClosedforumTopicClosed { }
 Optional. Service message: forum topic closed.
std::shared_ptr< ForumTopicReopenedforumTopicReopened { }
 Optional. Service message: forum topic reopened.
std::shared_ptr< GeneralForumTopicHiddengeneralForumTopicHidden { }
 Optional. Service message: the 'General' forum topic hidden.
std::shared_ptr< GeneralForumTopicUnhiddengeneralForumTopicUnhidden { }
 Optional. Service message: the 'General' forum topic unhidden.
std::shared_ptr< GiveawayCreatedgiveawayCreated { }
 Optional. Service message: a scheduled giveaway was created.
std::shared_ptr< Giveawaygiveaway { }
 Optional. The message is a scheduled giveaway message.
std::shared_ptr< GiveawayWinnersgiveawayWinners { }
 Optional. A giveaway with public winners was completed.
std::shared_ptr< GiveawayCompletedgiveawayCompleted { }
 Optional. Service message: a giveaway without public winners was completed.
std::shared_ptr< ManagedBotCreatedmanagedBotCreated { }
 Optional. Service message: user created a bot that will be managed by the current bot.
std::shared_ptr< PaidMessagePriceChangedpaidMessagePriceChanged { }
 Optional. Service message: the price for paid messages has changed in the chat.
std::shared_ptr< PollOptionAddedpollOptionAdded { }
 Optional. Service message: answer option was added to a poll.
std::shared_ptr< PollOptionDeletedpollOptionDeleted { }
 Optional. Service message: answer option was deleted from a poll.
std::shared_ptr< SuggestedPostApprovedsuggestedPostApproved { }
 Optional. Service message: a suggested post was approved.
std::shared_ptr< SuggestedPostApprovalFailedsuggestedPostApprovalFailed { }
 Optional. Service message: approval of a suggested post has failed.
std::shared_ptr< SuggestedPostDeclinedsuggestedPostDeclined { }
 Optional. Service message: a suggested post was declined.
std::shared_ptr< SuggestedPostPaidsuggestedPostPaid { }
 Optional. Service message: payment for a suggested post was received.
std::shared_ptr< SuggestedPostRefundedsuggestedPostRefunded { }
 Optional. Service message: payment for a suggested post was refunded.
std::shared_ptr< VideoChatScheduledvideoChatScheduled { }
 Optional. Service message: video chat scheduled.
std::shared_ptr< VideoChatStartedvideoChatStarted { }
 Optional. Service message: video chat started.
std::shared_ptr< VideoChatEndedvideoChatEnded { }
 Optional. Service message: video chat ended.
std::shared_ptr< VideoChatParticipantsInvitedvideoChatParticipantsInvited { }
 Optional. Service message: new participants invited to a video chat.
std::shared_ptr< WebAppDatawebAppData { }
 Optional. Service message: data sent by a Web App.
std::shared_ptr< InlineKeyboardMarkupreplyMarkup { }
 Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.

Detailed Description

This object represents a message.

Definition at line 8912 of file Types.h.

Member Typedef Documentation

◆ Ptr

using TgBot::Message::Ptr = std::shared_ptr<Message>

Definition at line 8913 of file Types.h.

Member Data Documentation

◆ animation

std::shared_ptr<Animation> TgBot::Message::animation { }

Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set.

Definition at line 9153 of file Types.h.

◆ audio

std::shared_ptr<Audio> TgBot::Message::audio { }

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

Definition at line 9158 of file Types.h.

◆ authorSignature

std::optional<std::string> TgBot::Message::authorSignature { }

Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator.

Definition at line 9107 of file Types.h.

◆ boostAdded

std::shared_ptr<ChatBoostAdded> TgBot::Message::boostAdded { }

Optional. Service message: user boosted the chat.

Definition at line 9420 of file Types.h.

◆ businessConnectionId

std::optional<std::string> TgBot::Message::businessConnectionId { }

Optional. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.

Definition at line 8999 of file Types.h.

◆ caption

std::optional<std::string> TgBot::Message::caption { }

Optional. Caption for the animation, audio, document, paid media, photo, video or voice.

Definition at line 9209 of file Types.h.

◆ captionEntities

std::optional<std::vector<std::shared_ptr<MessageEntity> > > 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 9215 of file Types.h.

◆ channelChatCreated

std::optional<bool> TgBot::Message::channelChatCreated { }

Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.

Definition at line 9319 of file Types.h.

◆ chat

std::shared_ptr<Chat> TgBot::Message::chat { }

Chat the message belongs to.

Definition at line 9004 of file Types.h.

◆ chatBackgroundSet

std::shared_ptr<ChatBackground> TgBot::Message::chatBackgroundSet { }

Optional. Service message: chat background set.

Definition at line 9425 of file Types.h.

◆ chatOwnerChanged

std::shared_ptr<ChatOwnerChanged> TgBot::Message::chatOwnerChanged { }

Optional. Service message: chat owner has changed.

Definition at line 9283 of file Types.h.

◆ chatOwnerLeft

std::shared_ptr<ChatOwnerLeft> TgBot::Message::chatOwnerLeft { }

Optional. Service message: chat owner has left.

Definition at line 9278 of file Types.h.

◆ chatShared

std::shared_ptr<ChatShared> TgBot::Message::chatShared { }

Optional. Service message: a chat was shared with the bot.

Definition at line 9376 of file Types.h.

◆ checklist

std::shared_ptr<Checklist> TgBot::Message::checklist { }

Optional. Message is a checklist.

Definition at line 9230 of file Types.h.

◆ checklistTasksAdded

std::shared_ptr<ChecklistTasksAdded> TgBot::Message::checklistTasksAdded { }

Optional. Service message: tasks were added to a checklist.

Definition at line 9435 of file Types.h.

◆ checklistTasksDone

std::shared_ptr<ChecklistTasksDone> TgBot::Message::checklistTasksDone { }

Optional. Service message: some tasks in a checklist were marked as done or not done.

Definition at line 9430 of file Types.h.

◆ communityChatAdded

std::shared_ptr<CommunityChatAdded> TgBot::Message::communityChatAdded { }

Optional. Service message: chat added to a Community.

Definition at line 9440 of file Types.h.

◆ communityChatRemoved

std::shared_ptr<CommunityChatRemoved> TgBot::Message::communityChatRemoved { }

Optional. Service message: chat removed from a Community.

Definition at line 9445 of file Types.h.

◆ connectedWebsite

std::optional<std::string> TgBot::Message::connectedWebsite { }

Optional. The domain name of the website on which the user has logged in. More about Telegram Login »

Definition at line 9397 of file Types.h.

◆ contact

std::shared_ptr<Contact> TgBot::Message::contact { }

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

Definition at line 9235 of file Types.h.

◆ date

std::int32_t TgBot::Message::date { }

Date the message was sent in Unix time. It is always a positive number, representing a valid date.

Definition at line 8983 of file Types.h.

◆ deleteChatPhoto

std::optional<bool> TgBot::Message::deleteChatPhoto { }

Optional. Service message: the chat photo was deleted.

Definition at line 9298 of file Types.h.

◆ dice

std::shared_ptr<Dice> TgBot::Message::dice { }

Optional. Message is a dice with random value.

Definition at line 9240 of file Types.h.

◆ directMessagePriceChanged

std::shared_ptr<DirectMessagePriceChanged> TgBot::Message::directMessagePriceChanged { }

Optional. Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed.

Definition at line 9451 of file Types.h.

◆ directMessagesTopic

std::shared_ptr<DirectMessagesTopic> TgBot::Message::directMessagesTopic { }

Optional. Information about the direct messages chat topic that contains the message.

Definition at line 8932 of file Types.h.

◆ document

std::shared_ptr<Document> TgBot::Message::document { }

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

Definition at line 9163 of file Types.h.

◆ editDate

std::optional<std::int32_t> TgBot::Message::editDate { }

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

Definition at line 9078 of file Types.h.

◆ effectId

std::optional<std::string> TgBot::Message::effectId { }

Optional. Unique identifier of the message effect added to the message.

Definition at line 9142 of file Types.h.

◆ entities

std::optional<std::vector<std::shared_ptr<MessageEntity> > > TgBot::Message::entities { }

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

Definition at line 9124 of file Types.h.

◆ ephemeralMessageId

std::optional<std::int32_t> TgBot::Message::ephemeralMessageId { }

Optional. For ephemeral messages, identifier of the ephemeral message inside this chat. The identifier may be reused for another ephemeral message after the message is deleted or expires.

Definition at line 8977 of file Types.h.

◆ externalReply

std::shared_ptr<ExternalReplyInfo> TgBot::Message::externalReply { }

Optional. Information about the message that is being replied to, which may come from another chat or forum topic.

Definition at line 9035 of file Types.h.

◆ forumTopicClosed

std::shared_ptr<ForumTopicClosed> TgBot::Message::forumTopicClosed { }

Optional. Service message: forum topic closed.

Definition at line 9466 of file Types.h.

◆ forumTopicCreated

std::shared_ptr<ForumTopicCreated> TgBot::Message::forumTopicCreated { }

Optional. Service message: forum topic created.

Definition at line 9456 of file Types.h.

◆ forumTopicEdited

std::shared_ptr<ForumTopicEdited> TgBot::Message::forumTopicEdited { }

Optional. Service message: forum topic edited.

Definition at line 9461 of file Types.h.

◆ forumTopicReopened

std::shared_ptr<ForumTopicReopened> TgBot::Message::forumTopicReopened { }

Optional. Service message: forum topic reopened.

Definition at line 9471 of file Types.h.

◆ forwardOrigin

std::shared_ptr<MessageOrigin> TgBot::Message::forwardOrigin { }

Optional. Information about the original message for forwarded messages.

Definition at line 9009 of file Types.h.

◆ from

std::shared_ptr<User> TgBot::Message::from { }

Optional. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats.

Definition at line 8939 of file Types.h.

◆ game

std::shared_ptr<Game> TgBot::Message::game { }

Optional. Message is a game, information about the game. More about games »

Definition at line 9245 of file Types.h.

◆ generalForumTopicHidden

std::shared_ptr<GeneralForumTopicHidden> TgBot::Message::generalForumTopicHidden { }

Optional. Service message: the 'General' forum topic hidden.

Definition at line 9476 of file Types.h.

◆ generalForumTopicUnhidden

std::shared_ptr<GeneralForumTopicUnhidden> TgBot::Message::generalForumTopicUnhidden { }

Optional. Service message: the 'General' forum topic unhidden.

Definition at line 9481 of file Types.h.

◆ gift

std::shared_ptr<GiftInfo> TgBot::Message::gift { }

Optional. Service message: a regular gift was sent or received.

Definition at line 9381 of file Types.h.

◆ giftUpgradeSent

std::shared_ptr<GiftInfo> TgBot::Message::giftUpgradeSent { }

Optional. Service message: upgrade of a gift was purchased after the gift was sent.

Definition at line 9391 of file Types.h.

◆ giveaway

std::shared_ptr<Giveaway> TgBot::Message::giveaway { }

Optional. The message is a scheduled giveaway message.

Definition at line 9491 of file Types.h.

◆ giveawayCompleted

std::shared_ptr<GiveawayCompleted> TgBot::Message::giveawayCompleted { }

Optional. Service message: a giveaway without public winners was completed.

Definition at line 9501 of file Types.h.

◆ giveawayCreated

std::shared_ptr<GiveawayCreated> TgBot::Message::giveawayCreated { }

Optional. Service message: a scheduled giveaway was created.

Definition at line 9486 of file Types.h.

◆ giveawayWinners

std::shared_ptr<GiveawayWinners> TgBot::Message::giveawayWinners { }

Optional. A giveaway with public winners was completed.

Definition at line 9496 of file Types.h.

◆ groupChatCreated

std::optional<bool> TgBot::Message::groupChatCreated { }

Optional. Service message: the group has been created.

Definition at line 9303 of file Types.h.

◆ guestBotCallerChat

std::shared_ptr<Chat> TgBot::Message::guestBotCallerChat { }

Optional. For a message sent by a guest bot, this is the chat whose original message triggered the bot's response.

Definition at line 9073 of file Types.h.

◆ guestBotCallerUser

std::shared_ptr<User> TgBot::Message::guestBotCallerUser { }

Optional. For a message sent by a guest bot, this is the user whose original message triggered the bot's response.

Definition at line 9067 of file Types.h.

◆ guestQueryId

std::optional<std::string> TgBot::Message::guestQueryId { }

Optional. The unique identifier for the guest query. Use this identifier with the method answerGuestQuery to send a response message. If non-empty, the message belongs to the chat where the guest bot was summoned, which may not coincide with other existing bot chats sharing the same identifier.

Definition at line 8991 of file Types.h.

◆ hasMediaSpoiler

std::optional<bool> TgBot::Message::hasMediaSpoiler { }

Optional. True, if the message media is covered by a spoiler animation.

Definition at line 9225 of file Types.h.

◆ hasProtectedContent

std::optional<bool> TgBot::Message::hasProtectedContent { }

Optional. True, if the message can't be forwarded.

Definition at line 9083 of file Types.h.

◆ invoice

std::shared_ptr<Invoice> TgBot::Message::invoice { }

Optional. Message is an invoice for a payment, information about the invoice. More about payments »

Definition at line 9354 of file Types.h.

◆ isAutomaticForward

std::optional<bool> TgBot::Message::isAutomaticForward { }

Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group.

Definition at line 9021 of file Types.h.

◆ isFromOffline

std::optional<bool> TgBot::Message::isFromOffline { }

Optional. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message.

Definition at line 9089 of file Types.h.

◆ isPaidPost

std::optional<bool> TgBot::Message::isPaidPost { }

Optional. True, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited.

Definition at line 9095 of file Types.h.

◆ isTopicMessage

std::optional<bool> TgBot::Message::isTopicMessage { }

Optional. True, if the message is sent to a topic in a forum supergroup or a private chat with the bot.

Definition at line 9015 of file Types.h.

◆ leftChatMember

std::shared_ptr<User> TgBot::Message::leftChatMember { }

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

Definition at line 9273 of file Types.h.

◆ linkPreviewOptions

std::shared_ptr<LinkPreviewOptions> TgBot::Message::linkPreviewOptions { }

Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed.

Definition at line 9130 of file Types.h.

◆ livePhoto

std::shared_ptr<LivePhoto> TgBot::Message::livePhoto { }

Optional. Message is a live photo, information about the live photo. For backward compatibility, when this field is set, the photo field will also be set.

Definition at line 9169 of file Types.h.

◆ location

std::shared_ptr<Location> TgBot::Message::location { }

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

Definition at line 9261 of file Types.h.

◆ managedBotCreated

std::shared_ptr<ManagedBotCreated> TgBot::Message::managedBotCreated { }

Optional. Service message: user created a bot that will be managed by the current bot.

Definition at line 9506 of file Types.h.

◆ mediaGroupId

std::optional<std::string> TgBot::Message::mediaGroupId { }

Optional. The unique identifier inside this chat of a media message group this message belongs to.

Definition at line 9101 of file Types.h.

◆ messageAutoDeleteTimerChanged

std::shared_ptr<MessageAutoDeleteTimerChanged> TgBot::Message::messageAutoDeleteTimerChanged { }

Optional. Service message: auto-delete timer settings changed in the chat.

Definition at line 9324 of file Types.h.

◆ messageId

std::int32_t TgBot::Message::messageId { }

Unique message identifier inside this chat; 0 for ephemeral messages. In specific instances (e.g., a message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent.

Definition at line 8921 of file Types.h.

◆ messageThreadId

std::optional<std::int32_t> TgBot::Message::messageThreadId { }

Optional. Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only.

Definition at line 8927 of file Types.h.

◆ migrateFromChatId

std::optional<std::int64_t> TgBot::Message::migrateFromChatId { }

Optional. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.

Definition at line 9342 of file Types.h.

◆ migrateToChatId

std::optional<std::int64_t> TgBot::Message::migrateToChatId { }

Optional. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.

Definition at line 9333 of file Types.h.

◆ newChatMembers

std::optional<std::vector<std::shared_ptr<User> > > 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 9267 of file Types.h.

◆ newChatPhoto

std::optional<std::vector<std::shared_ptr<PhotoSize> > > TgBot::Message::newChatPhoto { }

Optional. A chat photo was change to this value.

Definition at line 9293 of file Types.h.

◆ newChatTitle

std::optional<std::string> TgBot::Message::newChatTitle { }

Optional. A chat title was changed to this value.

Definition at line 9288 of file Types.h.

◆ paidMedia

std::shared_ptr<PaidMediaInfo> TgBot::Message::paidMedia { }

Optional. Message contains paid media; information about the paid media.

Definition at line 9174 of file Types.h.

◆ paidMessagePriceChanged

std::shared_ptr<PaidMessagePriceChanged> TgBot::Message::paidMessagePriceChanged { }

Optional. Service message: the price for paid messages has changed in the chat.

Definition at line 9511 of file Types.h.

◆ paidStarCount

std::optional<std::int32_t> TgBot::Message::paidStarCount { }

Optional. The number of Telegram Stars that were paid by the sender of the message to send it.

Definition at line 9113 of file Types.h.

◆ passportData

std::shared_ptr<PassportData> TgBot::Message::passportData { }

Optional. Telegram Passport data.

Definition at line 9409 of file Types.h.

◆ photo

std::optional<std::vector<std::shared_ptr<PhotoSize> > > TgBot::Message::photo { }

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

Definition at line 9179 of file Types.h.

◆ pinnedMessage

std::shared_ptr<MaybeInaccessibleMessage> 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 itself is a reply.

Definition at line 9348 of file Types.h.

◆ poll

std::shared_ptr<Poll> TgBot::Message::poll { }

Optional. Message is a native poll, information about the poll.

Definition at line 9250 of file Types.h.

◆ pollOptionAdded

std::shared_ptr<PollOptionAdded> TgBot::Message::pollOptionAdded { }

Optional. Service message: answer option was added to a poll.

Definition at line 9516 of file Types.h.

◆ pollOptionDeleted

std::shared_ptr<PollOptionDeleted> TgBot::Message::pollOptionDeleted { }

Optional. Service message: answer option was deleted from a poll.

Definition at line 9521 of file Types.h.

◆ proximityAlertTriggered

std::shared_ptr<ProximityAlertTriggered> TgBot::Message::proximityAlertTriggered { }

Optional. Service message: a user in the chat triggered another user's proximity alert while sharing Live Location.

Definition at line 9415 of file Types.h.

◆ quote

std::shared_ptr<TextQuote> TgBot::Message::quote { }

Optional. For replies that quote part of the original message, the quoted part of the message.

Definition at line 9041 of file Types.h.

◆ receiverUser

std::shared_ptr<User> TgBot::Message::receiverUser { }

Optional. For ephemeral messages, the user who received the message.

Definition at line 8970 of file Types.h.

◆ refundedPayment

std::shared_ptr<RefundedPayment> TgBot::Message::refundedPayment { }

Optional. Message is a service message about a refunded payment, information about the payment. More about payments »

Definition at line 9366 of file Types.h.

◆ replyMarkup

std::shared_ptr<InlineKeyboardMarkup> TgBot::Message::replyMarkup { }

Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.

Definition at line 9577 of file Types.h.

◆ replyToChecklistTaskId

std::optional<std::int32_t> TgBot::Message::replyToChecklistTaskId { }

Optional. Identifier of the specific checklist task that is being replied to.

Definition at line 9051 of file Types.h.

◆ replyToMessage

std::shared_ptr<Message> TgBot::Message::replyToMessage { }

Optional. For replies in the same chat and message thread, 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. If the message is a reply to an ephemeral message, then this field may be omitted.

Definition at line 9029 of file Types.h.

◆ replyToPollOptionId

std::optional<std::string> TgBot::Message::replyToPollOptionId { }

Optional. Persistent identifier of the specific poll option that is being replied to.

Definition at line 9056 of file Types.h.

◆ replyToStory

std::shared_ptr<Story> TgBot::Message::replyToStory { }

Optional. For replies to a story, the original story.

Definition at line 9046 of file Types.h.

◆ richMessage

std::shared_ptr<RichMessage> TgBot::Message::richMessage { }

Optional. Message is a rich formatted message.

Definition at line 9147 of file Types.h.

◆ senderBoostCount

std::optional<std::int32_t> TgBot::Message::senderBoostCount { }

Optional. If the sender of the message boosted the chat, the number of boosts added by the user.

Definition at line 8954 of file Types.h.

◆ senderBusinessBot

std::shared_ptr<User> TgBot::Message::senderBusinessBot { }

Optional. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.

Definition at line 8960 of file Types.h.

◆ senderChat

std::shared_ptr<Chat> TgBot::Message::senderChat { }

Optional. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field from contains a fake sender user in non-channel chats.

Definition at line 8948 of file Types.h.

◆ senderTag

std::optional<std::string> TgBot::Message::senderTag { }

Optional. Tag or custom title of the sender of the message; for supergroups only.

Definition at line 8965 of file Types.h.

◆ showCaptionAboveMedia

std::optional<bool> TgBot::Message::showCaptionAboveMedia { }

Optional. True, if the caption must be shown above the message media.

Definition at line 9220 of file Types.h.

◆ sticker

std::shared_ptr<Sticker> TgBot::Message::sticker { }

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

Definition at line 9184 of file Types.h.

◆ story

std::shared_ptr<Story> TgBot::Message::story { }

Optional. Message is a forwarded story.

Definition at line 9189 of file Types.h.

◆ successfulPayment

std::shared_ptr<SuccessfulPayment> TgBot::Message::successfulPayment { }

Optional. Message is a service message about a successful payment, information about the payment. More about payments »

Definition at line 9360 of file Types.h.

◆ suggestedPostApprovalFailed

std::shared_ptr<SuggestedPostApprovalFailed> TgBot::Message::suggestedPostApprovalFailed { }

Optional. Service message: approval of a suggested post has failed.

Definition at line 9531 of file Types.h.

◆ suggestedPostApproved

std::shared_ptr<SuggestedPostApproved> TgBot::Message::suggestedPostApproved { }

Optional. Service message: a suggested post was approved.

Definition at line 9526 of file Types.h.

◆ suggestedPostDeclined

std::shared_ptr<SuggestedPostDeclined> TgBot::Message::suggestedPostDeclined { }

Optional. Service message: a suggested post was declined.

Definition at line 9536 of file Types.h.

◆ suggestedPostInfo

std::shared_ptr<SuggestedPostInfo> TgBot::Message::suggestedPostInfo { }

Optional. Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited.

Definition at line 9137 of file Types.h.

◆ suggestedPostPaid

std::shared_ptr<SuggestedPostPaid> TgBot::Message::suggestedPostPaid { }

Optional. Service message: payment for a suggested post was received.

Definition at line 9541 of file Types.h.

◆ suggestedPostRefunded

std::shared_ptr<SuggestedPostRefunded> TgBot::Message::suggestedPostRefunded { }

Optional. Service message: payment for a suggested post was refunded.

Definition at line 9546 of file Types.h.

◆ supergroupChatCreated

std::optional<bool> TgBot::Message::supergroupChatCreated { }

Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.

Definition at line 9311 of file Types.h.

◆ text

std::optional<std::string> TgBot::Message::text { }

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

Definition at line 9118 of file Types.h.

◆ uniqueGift

std::shared_ptr<UniqueGiftInfo> TgBot::Message::uniqueGift { }

Optional. Service message: a unique gift was sent or received.

Definition at line 9386 of file Types.h.

◆ usersShared

std::shared_ptr<UsersShared> TgBot::Message::usersShared { }

Optional. Service message: users were shared with the bot.

Definition at line 9371 of file Types.h.

◆ venue

std::shared_ptr<Venue> TgBot::Message::venue { }

Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set.

Definition at line 9256 of file Types.h.

◆ viaBot

std::shared_ptr<User> TgBot::Message::viaBot { }

Optional. Bot through which the message was sent.

Definition at line 9061 of file Types.h.

◆ video

std::shared_ptr<Video> TgBot::Message::video { }

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

Definition at line 9194 of file Types.h.

◆ videoChatEnded

std::shared_ptr<VideoChatEnded> TgBot::Message::videoChatEnded { }

Optional. Service message: video chat ended.

Definition at line 9561 of file Types.h.

◆ videoChatParticipantsInvited

std::shared_ptr<VideoChatParticipantsInvited> TgBot::Message::videoChatParticipantsInvited { }

Optional. Service message: new participants invited to a video chat.

Definition at line 9566 of file Types.h.

◆ videoChatScheduled

std::shared_ptr<VideoChatScheduled> TgBot::Message::videoChatScheduled { }

Optional. Service message: video chat scheduled.

Definition at line 9551 of file Types.h.

◆ videoChatStarted

std::shared_ptr<VideoChatStarted> TgBot::Message::videoChatStarted { }

Optional. Service message: video chat started.

Definition at line 9556 of file Types.h.

◆ videoNote

std::shared_ptr<VideoNote> TgBot::Message::videoNote { }

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

Definition at line 9199 of file Types.h.

◆ voice

std::shared_ptr<Voice> TgBot::Message::voice { }

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

Definition at line 9204 of file Types.h.

◆ webAppData

std::shared_ptr<WebAppData> TgBot::Message::webAppData { }

Optional. Service message: data sent by a Web App.

Definition at line 9571 of file Types.h.

◆ writeAccessAllowed

std::shared_ptr<WriteAccessAllowed> TgBot::Message::writeAccessAllowed { }

Optional. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.

Definition at line 9404 of file Types.h.


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