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< Messagemessage { }
 Optional. New incoming message of any kind - text, photo, sticker, etc.
std::shared_ptr< MessageeditedMessage { }
 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< MessagechannelPost { }
 Optional. New incoming channel post of any kind - text, photo, sticker, etc.
std::shared_ptr< MessageeditedChannelPost { }
 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< BusinessConnectionbusinessConnection { }
 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< MessagebusinessMessage { }
 Optional. New message from a connected business account.
std::shared_ptr< MessageeditedBusinessMessage { }
 Optional. New version of a message from a connected business account.
std::shared_ptr< BusinessMessagesDeleteddeletedBusinessMessages { }
 Optional. Messages were deleted from a connected business account.
std::shared_ptr< MessageguestMessage { }
 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< MessageReactionUpdatedmessageReaction { }
 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< MessageReactionCountUpdatedmessageReactionCount { }
 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< InlineQueryinlineQuery { }
 Optional. New incoming inline query.
std::shared_ptr< ChosenInlineResultchosenInlineResult { }
 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< CallbackQuerycallbackQuery { }
 Optional. New incoming callback query.
std::shared_ptr< ShippingQueryshippingQuery { }
 Optional. New incoming shipping query. Only for invoices with flexible price.
std::shared_ptr< PreCheckoutQuerypreCheckoutQuery { }
 Optional. New incoming pre-checkout query. Contains full information about checkout.
std::shared_ptr< PaidMediaPurchasedpurchasedPaidMedia { }
 Optional. A user purchased paid media with a non-empty payload sent by the bot in a non- channel chat.
std::shared_ptr< Pollpoll { }
 Optional. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot.
std::shared_ptr< PollAnswerpollAnswer { }
 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< ChatMemberUpdatedmyChatMember { }
 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< ChatMemberUpdatedchatMember { }
 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< ChatJoinRequestchatJoinRequest { }
 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< ChatBoostUpdatedchatBoost { }
 Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.
std::shared_ptr< ChatBoostRemovedremovedChatBoost { }
 Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
std::shared_ptr< ManagedBotUpdatedmanagedBot { }
 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< BotSubscriptionUpdatedsubscription { }
 Optional. User payment subscription has changed.

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 14611 of file Types.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 14612 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 14652 of file Types.h.

◆ businessMessage

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

Optional. New message from a connected business account.

Definition at line 14657 of file Types.h.

◆ callbackQuery

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

Optional. New incoming callback query.

Definition at line 14706 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 14639 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 14759 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 14753 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 14747 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 14701 of file Types.h.

◆ deletedBusinessMessages

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

Optional. Messages were deleted from a connected business account.

Definition at line 14667 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 14662 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 14646 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 14634 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 14673 of file Types.h.

◆ inlineQuery

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

Optional. New incoming inline query.

Definition at line 14694 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 14771 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 14627 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 14681 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 14689 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 14740 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 14728 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 14734 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 14716 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 14722 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 14765 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 14711 of file Types.h.

◆ subscription

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

Optional. User payment subscription has changed.

Definition at line 14776 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 14622 of file Types.h.


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