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

This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present. More...

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<CallbackQuery>

Public Attributes

std::string id { }
 Unique identifier for this query.
std::shared_ptr< User > from { }
 Sender.
std::shared_ptr< MaybeInaccessibleMessage > message { }
 Optional. Message sent by the bot with the callback button that originated the query.
std::optional< std::string > inlineMessageId { }
 Optional. Identifier of the message sent via the bot in inline mode, that originated the query.
std::string chatInstance { }
 Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
std::optional< std::string > data { }
 Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.
std::optional< std::string > gameShortName { }
 Optional. Short name of a Game to be returned, serves as the unique identifier for the game.

Detailed Description

This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.

Definition at line 1379 of file Types.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 1380 of file Types.h.

Member Data Documentation

◆ chatInstance

std::string TgBot::CallbackQuery::chatInstance { }

Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.

Definition at line 1403 of file Types.h.

◆ data

std::optional<std::string> TgBot::CallbackQuery::data { }

Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.

Definition at line 1408 of file Types.h.

◆ from

std::shared_ptr<User> TgBot::CallbackQuery::from { }

Sender.

Definition at line 1389 of file Types.h.

◆ gameShortName

std::optional<std::string> TgBot::CallbackQuery::gameShortName { }

Optional. Short name of a Game to be returned, serves as the unique identifier for the game.

Definition at line 1413 of file Types.h.

◆ id

std::string TgBot::CallbackQuery::id { }

Unique identifier for this query.

Definition at line 1385 of file Types.h.

◆ inlineMessageId

std::optional<std::string> TgBot::CallbackQuery::inlineMessageId { }

Optional. Identifier of the message sent via the bot in inline mode, that originated the query.

Definition at line 1398 of file Types.h.

◆ message

std::shared_ptr<MaybeInaccessibleMessage> TgBot::CallbackQuery::message { }

Optional. Message sent by the bot with the callback button that originated the query.

Definition at line 1393 of file Types.h.


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