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

This object represents an incoming update.At most one of the optional fields can be present in any given update. More...

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<Update>

Public Attributes

std::int32_t updateId { }
 The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.
std::shared_ptr< Message > message { }
 Optional. New incoming message of any kind - text, photo, sticker, etc.
std::shared_ptr< Message > editedMessage { }
 Optional. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.
std::shared_ptr< Message > channelPost { }
 Optional. New incoming channel post of any kind - text, photo, sticker, etc.
std::shared_ptr< Message > editedChannelPost { }
 Optional. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.
std::shared_ptr< BusinessConnection > businessConnection { }
 Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot.
std::shared_ptr< Message > businessMessage { }
 Optional. New message from a connected business account.
std::shared_ptr< Message > editedBusinessMessage { }
 Optional. New version of a message from a connected business account.
std::shared_ptr< BusinessMessagesDeleted > deletedBusinessMessages { }
 Optional. Messages were deleted from a connected business account.
std::shared_ptr< Message > guestMessage { }
 Optional. New guest message. The bot can use the field Message.guest_query_id and the method answerGuestQuery to send a message in response.
std::shared_ptr< MessageReactionUpdated > messageReaction { }
 Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.
std::shared_ptr< MessageReactionCountUpdated > messageReactionCount { }
 Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify "message_reaction_count" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes.
std::shared_ptr< InlineQuery > inlineQuery { }
 Optional. New incoming inline query.
std::shared_ptr< ChosenInlineResult > chosenInlineResult { }
 Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
std::shared_ptr< CallbackQuery > callbackQuery { }
 Optional. New incoming callback query.
std::shared_ptr< ShippingQuery > shippingQuery { }
 Optional. New incoming shipping query. Only for invoices with flexible price.
std::shared_ptr< PreCheckoutQuery > preCheckoutQuery { }
 Optional. New incoming pre-checkout query. Contains full information about checkout.
std::shared_ptr< PaidMediaPurchased > purchasedPaidMedia { }
 Optional. A user purchased paid media with a non-empty payload sent by the bot in a non- channel chat.
std::shared_ptr< Poll > poll { }
 Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot.
std::shared_ptr< PollAnswer > pollAnswer { }
 Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
std::shared_ptr< ChatMemberUpdated > myChatMember { }
 Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.
std::shared_ptr< ChatMemberUpdated > chatMember { }
 Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify "chat_member" in the list of allowed_updates to receive these updates.
std::shared_ptr< ChatJoinRequest > chatJoinRequest { }
 Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.
std::shared_ptr< ChatBoostUpdated > chatBoost { }
 Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.
std::shared_ptr< ChatBoostRemoved > removedChatBoost { }
 Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
std::shared_ptr< ManagedBotUpdated > managedBot { }
 Optional. A new bot was created to be managed by the bot, or token or owner of a managed bot was changed.
std::shared_ptr< BotSubscriptionUpdated > subscription { }
 Optional. User payment subscription has changed.
std::shared_ptr< MessageGenerationStopped > stoppedMessageGeneration { }
 Optional. A user asked the bot to stop the generation of a message.

Detailed Description

This object represents an incoming update.At most one of the optional fields can be present in any given update.

Definition at line 13628 of file Types.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 13629 of file Types.h.

Member Data Documentation

◆ businessConnection

std::shared_ptr<BusinessConnection> TgBot::Update::businessConnection { }

Optional. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot.

Definition at line 13664 of file Types.h.

◆ businessMessage

std::shared_ptr<Message> TgBot::Update::businessMessage { }

Optional. New message from a connected business account.

Definition at line 13668 of file Types.h.

◆ callbackQuery

std::shared_ptr<CallbackQuery> TgBot::Update::callbackQuery { }

Optional. New incoming callback query.

Definition at line 13709 of file Types.h.

◆ channelPost

std::shared_ptr<Message> TgBot::Update::channelPost { }

Optional. New incoming channel post of any kind - text, photo, sticker, etc.

Definition at line 13653 of file Types.h.

◆ chatBoost

std::shared_ptr<ChatBoostUpdated> TgBot::Update::chatBoost { }

Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.

Definition at line 13753 of file Types.h.

◆ chatJoinRequest

std::shared_ptr<ChatJoinRequest> TgBot::Update::chatJoinRequest { }

Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.

Definition at line 13748 of file Types.h.

◆ chatMember

std::shared_ptr<ChatMemberUpdated> TgBot::Update::chatMember { }

Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify "chat_member" in the list of allowed_updates to receive these updates.

Definition at line 13743 of file Types.h.

◆ chosenInlineResult

std::shared_ptr<ChosenInlineResult> TgBot::Update::chosenInlineResult { }

Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.

Definition at line 13705 of file Types.h.

◆ deletedBusinessMessages

std::shared_ptr<BusinessMessagesDeleted> TgBot::Update::deletedBusinessMessages { }

Optional. Messages were deleted from a connected business account.

Definition at line 13676 of file Types.h.

◆ editedBusinessMessage

std::shared_ptr<Message> TgBot::Update::editedBusinessMessage { }

Optional. New version of a message from a connected business account.

Definition at line 13672 of file Types.h.

◆ editedChannelPost

std::shared_ptr<Message> TgBot::Update::editedChannelPost { }

Optional. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.

Definition at line 13659 of file Types.h.

◆ editedMessage

std::shared_ptr<Message> TgBot::Update::editedMessage { }

Optional. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.

Definition at line 13649 of file Types.h.

◆ guestMessage

std::shared_ptr<Message> TgBot::Update::guestMessage { }

Optional. New guest message. The bot can use the field Message.guest_query_id and the method answerGuestQuery to send a message in response.

Definition at line 13681 of file Types.h.

◆ inlineQuery

std::shared_ptr<InlineQuery> TgBot::Update::inlineQuery { }

Optional. New incoming inline query.

Definition at line 13699 of file Types.h.

◆ managedBot

std::shared_ptr<ManagedBotUpdated> TgBot::Update::managedBot { }

Optional. A new bot was created to be managed by the bot, or token or owner of a managed bot was changed.

Definition at line 13763 of file Types.h.

◆ message

std::shared_ptr<Message> TgBot::Update::message { }

Optional. New incoming message of any kind - text, photo, sticker, etc.

Definition at line 13643 of file Types.h.

◆ messageReaction

std::shared_ptr<MessageReactionUpdated> TgBot::Update::messageReaction { }

Optional. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots.

Definition at line 13688 of file Types.h.

◆ messageReactionCount

std::shared_ptr<MessageReactionCountUpdated> TgBot::Update::messageReactionCount { }

Optional. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify "message_reaction_count" in the list of allowed_updates to receive these updates. The updates are grouped and can be sent with delay up to a few minutes.

Definition at line 13695 of file Types.h.

◆ myChatMember

std::shared_ptr<ChatMemberUpdated> TgBot::Update::myChatMember { }

Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.

Definition at line 13737 of file Types.h.

◆ poll

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

Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot.

Definition at line 13727 of file Types.h.

◆ pollAnswer

std::shared_ptr<PollAnswer> TgBot::Update::pollAnswer { }

Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.

Definition at line 13732 of file Types.h.

◆ preCheckoutQuery

std::shared_ptr<PreCheckoutQuery> TgBot::Update::preCheckoutQuery { }

Optional. New incoming pre-checkout query. Contains full information about checkout.

Definition at line 13717 of file Types.h.

◆ purchasedPaidMedia

std::shared_ptr<PaidMediaPurchased> TgBot::Update::purchasedPaidMedia { }

Optional. A user purchased paid media with a non-empty payload sent by the bot in a non- channel chat.

Definition at line 13722 of file Types.h.

◆ removedChatBoost

std::shared_ptr<ChatBoostRemoved> TgBot::Update::removedChatBoost { }

Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.

Definition at line 13758 of file Types.h.

◆ shippingQuery

std::shared_ptr<ShippingQuery> TgBot::Update::shippingQuery { }

Optional. New incoming shipping query. Only for invoices with flexible price.

Definition at line 13713 of file Types.h.

◆ stoppedMessageGeneration

std::shared_ptr<MessageGenerationStopped> TgBot::Update::stoppedMessageGeneration { }

Optional. A user asked the bot to stop the generation of a message.

Definition at line 13771 of file Types.h.

◆ subscription

std::shared_ptr<BotSubscriptionUpdated> TgBot::Update::subscription { }

Optional. User payment subscription has changed.

Definition at line 13767 of file Types.h.

◆ updateId

std::int32_t TgBot::Update::updateId { }

The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.

Definition at line 13639 of file Types.h.


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