|
tgbotxx 1.1.9.2
Telegram Bot C++ Library
|
This object represents an incoming update. At most one of the optional parameters can be present in any given update. https://core.telegram.org/bots/api#update. More...
#include <Update.hpp>
Public Member Functions | |
| Update ()=default | |
| Update (const nl::json &json) | |
| nl::json | toJson () const |
| Serializes this object to JSON. | |
| void | fromJson (const nl::json &json) |
| Deserializes this object from JSON. | |
Public Attributes | |
| std::int32_t | updateId {} |
| The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID 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. | |
| Ptr< Message > | message |
| Optional. New incoming message of any kind — text, photo, sticker, etc. | |
| Ptr< Message > | editedMessage |
| Optional. New version of a message that is known to the bot and was edited. | |
| Ptr< Message > | channelPost |
| Optional. New incoming channel post of any kind — text, photo, sticker, etc. | |
| Ptr< Message > | editedChannelPost |
| Optional. New version of a channel post that is known to the bot and was edited. | |
| 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. | |
| Ptr< Message > | businessMessage |
| Optional. New message from a connected business account. | |
| Ptr< Message > | editedBusinessMessage |
| Optional. New version of a message from a connected business account. | |
| Ptr< BusinessMessagesDeleted > | deletedBusinessMessages |
| Optional. Messages were deleted from a connected business account. | |
| 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. | |
| 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. | |
| Ptr< InlineQuery > | inlineQuery |
| Optional. New incoming inline query. | |
| 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. | |
| Ptr< CallbackQuery > | callbackQuery |
| Optional. New incoming callback query. | |
| Ptr< ShippingQuery > | shippingQuery |
| Optional. New incoming shipping query. Only for invoices with flexible price. | |
| Ptr< PreCheckoutQuery > | preCheckoutQuery |
| Optional. New incoming pre-checkout query. Contains full information about checkout. | |
| Ptr< PaidMediaPurchased > | purchasedPaidMedia |
| Optional. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat. | |
| Ptr< Poll > | poll |
| Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| Ptr< ChatBoostUpdated > | chatBoost |
| Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates. | |
| Ptr< ChatBoostRemoved > | removedChatBoost |
| Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates. | |
This object represents an incoming update. At most one of the optional parameters can be present in any given update. https://core.telegram.org/bots/api#update.
Definition at line 27 of file Update.hpp.
|
default |
|
explicit |
| void tgbotxx::Update::fromJson | ( | const nl::json & | json | ) |
Deserializes this object from JSON.
| nl::json tgbotxx::Update::toJson | ( | ) | const |
Serializes this object to JSON.
| Ptr<BusinessConnection> tgbotxx::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 51 of file Update.hpp.
Optional. New message from a connected business account.
Definition at line 54 of file Update.hpp.
| Ptr<CallbackQuery> tgbotxx::Update::callbackQuery |
Optional. New incoming callback query.
Definition at line 80 of file Update.hpp.
Optional. New incoming channel post of any kind — text, photo, sticker, etc.
Definition at line 45 of file Update.hpp.
| Ptr<ChatBoostUpdated> tgbotxx::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 107 of file Update.hpp.
| Ptr<ChatJoinRequest> tgbotxx::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 104 of file Update.hpp.
| Ptr<ChatMemberUpdated> tgbotxx::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 101 of file Update.hpp.
| Ptr<ChosenInlineResult> tgbotxx::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 77 of file Update.hpp.
| Ptr<BusinessMessagesDeleted> tgbotxx::Update::deletedBusinessMessages |
Optional. Messages were deleted from a connected business account.
Definition at line 60 of file Update.hpp.
Optional. New version of a message from a connected business account.
Definition at line 57 of file Update.hpp.
Optional. New version of a channel post that is known to the bot and was edited.
Definition at line 48 of file Update.hpp.
Optional. New version of a message that is known to the bot and was edited.
Definition at line 42 of file Update.hpp.
| Ptr<InlineQuery> tgbotxx::Update::inlineQuery |
Optional. New incoming inline query.
Definition at line 73 of file Update.hpp.
Optional. New incoming message of any kind — text, photo, sticker, etc.
Definition at line 39 of file Update.hpp.
| Ptr<MessageReactionUpdated> tgbotxx::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 65 of file Update.hpp.
| Ptr<MessageReactionCountUpdated> tgbotxx::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 70 of file Update.hpp.
| Ptr<ChatMemberUpdated> tgbotxx::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 98 of file Update.hpp.
Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.
Definition at line 92 of file Update.hpp.
| Ptr<PollAnswer> tgbotxx::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 95 of file Update.hpp.
| Ptr<PreCheckoutQuery> tgbotxx::Update::preCheckoutQuery |
Optional. New incoming pre-checkout query. Contains full information about checkout.
Definition at line 86 of file Update.hpp.
| Ptr<PaidMediaPurchased> tgbotxx::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 89 of file Update.hpp.
| Ptr<ChatBoostRemoved> tgbotxx::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 110 of file Update.hpp.
| Ptr<ShippingQuery> tgbotxx::Update::shippingQuery |
Optional. New incoming shipping query. Only for invoices with flexible price.
Definition at line 83 of file Update.hpp.
| std::int32_t tgbotxx::Update::updateId {} |
The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID 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 36 of file Update.hpp.