tgbotxx 1.1.9.2
Telegram Bot C++ Library
Loading...
Searching...
No Matches
CallbackQuery.hpp
Go to the documentation of this file.
1#pragma once
5
6namespace nl = nlohmann;
7
8namespace tgbotxx {
10 struct Message;
11
23 CallbackQuery() = default;
24 explicit CallbackQuery(const nl::json& json);
25
27 std::string id;
28
31
34
36 std::string inlineMessageId;
37
40 std::string chatInstance;
41
44 std::string data;
45
47 std::string gameShortName;
48
51 [[nodiscard]] nl::json toJson() const;
52
54 void fromJson(const nl::json& json);
55 };
56}
std::shared_ptr< T > Ptr
Definition Ptr.hpp:6
std::variant< Ptr< Message >, Ptr< InaccessibleMessage > > MaybeInaccessibleMessage
This object describes a message that can be inaccessible to the bot. It can be one of.
This object represents an incoming callback query from a callback button in an inline keyboard....
std::string inlineMessageId
Optional. Identifier of the message sent via the bot in inline mode, that originated the query.
Ptr< User > from
Sender.
std::string gameShortName
Optional. Short name of a Game to be returned, serves as the unique identifier for the game.
std::string data
Optional. Data associated with the callback button.
std::string chatInstance
Global identifier, uniquely corresponding to the chat to which the message with the callback button w...
void fromJson(const nl::json &json)
Deserializes this object from JSON.
MaybeInaccessibleMessage message
Optional. Message sent by the bot with the callback button that originated the query.
std::string id
Unique identifier for this query.
nl::json toJson() const
Serializes this object to JSON.
CallbackQuery(const nl::json &json)