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

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

#include <Update.h>

Public Types

typedef std::shared_ptr< UpdatePtr
 

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.
 
Message::Ptr message
 Optional. New incoming message of any kind — text, photo, sticker, etc.
 
Message::Ptr editedMessage
 Optional. New version of a message that is known to the bot and was edited.
 
Message::Ptr channelPost
 Optional. New incoming channel post of any kind — text, photo, sticker, etc.
 
Message::Ptr editedChannelPost
 Optional. New version of a channel post that is known to the bot and was edited.
 
InlineQuery::Ptr inlineQuery
 Optional. New incoming inline query.
 
ChosenInlineResult::Ptr chosenInlineResult
 Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see https://core.telegram.org/bots/inline#collecting-feedback for details on how to enable these updates for your bot. (https://core.telegram.org/bots/inline#collecting-feedback)
 
CallbackQuery::Ptr callbackQuery
 Optional. New incoming callback query.
 
ShippingQuery::Ptr shippingQuery
 Optional. New incoming shipping query. Only for invoices with flexible price.
 
PreCheckoutQuery::Ptr preCheckoutQuery
 Optional. New incoming pre-checkout query. Contains full information about checkout.
 
Poll::Ptr poll
 Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.
 
PollAnswer::Ptr 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.
 
ChatMemberUpdated::Ptr 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.
 
ChatMemberUpdated::Ptr 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 “chatMember” in the list of allowedUpdates to receive these updates.
 
ChatJoinRequest::Ptr chatJoinRequest
 Optional. A request to join the chat has been sent. The bot must have the canInviteUsers administrator right in the chat to receive these updates.
 

Detailed Description

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

Definition at line 26 of file Update.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<Update> TgBot::Update::Ptr

Definition at line 29 of file Update.h.

Member Data Documentation

◆ callbackQuery

CallbackQuery::Ptr TgBot::Update::callbackQuery

Optional. New incoming callback query.

Definition at line 73 of file Update.h.

◆ channelPost

Message::Ptr TgBot::Update::channelPost

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

Definition at line 52 of file Update.h.

◆ chatJoinRequest

ChatJoinRequest::Ptr TgBot::Update::chatJoinRequest

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

Definition at line 115 of file Update.h.

◆ chatMember

ChatMemberUpdated::Ptr 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 “chatMember” in the list of allowedUpdates to receive these updates.

Definition at line 109 of file Update.h.

◆ chosenInlineResult

ChosenInlineResult::Ptr TgBot::Update::chosenInlineResult

Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see https://core.telegram.org/bots/inline#collecting-feedback for details on how to enable these updates for your bot. (https://core.telegram.org/bots/inline#collecting-feedback)

Definition at line 68 of file Update.h.

◆ editedChannelPost

Message::Ptr TgBot::Update::editedChannelPost

Optional. New version of a channel post that is known to the bot and was edited.

Definition at line 57 of file Update.h.

◆ editedMessage

Message::Ptr TgBot::Update::editedMessage

Optional. New version of a message that is known to the bot and was edited.

Definition at line 47 of file Update.h.

◆ inlineQuery

InlineQuery::Ptr TgBot::Update::inlineQuery

Optional. New incoming inline query.

Definition at line 62 of file Update.h.

◆ message

Message::Ptr TgBot::Update::message

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

Definition at line 42 of file Update.h.

◆ myChatMember

ChatMemberUpdated::Ptr 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 103 of file Update.h.

◆ poll

Poll::Ptr TgBot::Update::poll

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

Definition at line 91 of file Update.h.

◆ pollAnswer

PollAnswer::Ptr 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 97 of file Update.h.

◆ preCheckoutQuery

PreCheckoutQuery::Ptr TgBot::Update::preCheckoutQuery

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

Definition at line 85 of file Update.h.

◆ shippingQuery

ShippingQuery::Ptr TgBot::Update::shippingQuery

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

Definition at line 79 of file Update.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 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 37 of file Update.h.


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