tgbotxx
1.1.6.9
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. More... | |
void | fromJson (const nl::json &json) |
Deserializes this object from JSON. More... | |
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. More... | |
Ptr< Message > | message |
Optional. New incoming message of any kind — text, photo, sticker, etc. More... | |
Ptr< Message > | editedMessage |
Optional. New version of a message that is known to the bot and was edited. More... | |
Ptr< Message > | channelPost |
Optional. New incoming channel post of any kind — text, photo, sticker, etc. More... | |
Ptr< Message > | editedChannelPost |
Optional. New version of a channel post that is known to the bot and was edited. More... | |
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. More... | |
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. More... | |
Ptr< InlineQuery > | inlineQuery |
Optional. New incoming inline query. More... | |
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. More... | |
Ptr< CallbackQuery > | callbackQuery |
Optional. New incoming callback query. More... | |
Ptr< ShippingQuery > | shippingQuery |
Optional. New incoming shipping query. Only for invoices with flexible price. More... | |
Ptr< PreCheckoutQuery > | preCheckoutQuery |
Optional. New incoming pre-checkout query. Contains full information about checkout. More... | |
Ptr< Poll > | poll |
Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Ptr< ChatBoostUpdated > | chatBoost |
Optional. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates. More... | |
Ptr< ChatBoostRemoved > | removedChatBoost |
Optional. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates. More... | |
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 22 of file Update.hpp.
|
default |
|
inlineexplicit |
Definition at line 24 of file Update.hpp.
|
inline |
Deserializes this object from JSON.
Definition at line 121 of file Update.hpp.
|
inline |
Serializes this object to JSON.
Definition at line 96 of file Update.hpp.
Ptr<CallbackQuery> tgbotxx::Update::callbackQuery |
Optional. New incoming callback query.
Definition at line 65 of file Update.hpp.
Optional. New incoming channel post of any kind — text, photo, sticker, etc.
Definition at line 42 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 89 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 86 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 83 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 62 of file Update.hpp.
Optional. New version of a channel post that is known to the bot and was edited.
Definition at line 45 of file Update.hpp.
Optional. New version of a message that is known to the bot and was edited.
Definition at line 39 of file Update.hpp.
Ptr<InlineQuery> tgbotxx::Update::inlineQuery |
Optional. New incoming inline query.
Definition at line 58 of file Update.hpp.
Optional. New incoming message of any kind — text, photo, sticker, etc.
Definition at line 36 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 50 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 55 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 80 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 74 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 77 of file Update.hpp.
Ptr<PreCheckoutQuery> tgbotxx::Update::preCheckoutQuery |
Optional. New incoming pre-checkout query. Contains full information about checkout.
Definition at line 71 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 92 of file Update.hpp.
Ptr<ShippingQuery> tgbotxx::Update::shippingQuery |
Optional. New incoming shipping query. Only for invoices with flexible price.
Definition at line 68 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 33 of file Update.hpp.