tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::ChosenInlineResult Struct Reference

Represents a result of an inline query that was chosen by the user and sent to their chat partner. https://core.telegram.org/bots/api#choseninlineresult. More...

#include <ChosenInlineResult.hpp>

Public Member Functions

 ChosenInlineResult ()=default
 
 ChosenInlineResult (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::string resultId
 The unique identifier for the result that was chosen. More...
 
Ptr< Userfrom
 The user that chose the result. More...
 
Ptr< Locationlocation
 Optional. Sender location, only for bots that require user location. More...
 
std::string inlineMessageId
 Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message. More...
 
std::string query
 The query that was used to obtain the result. More...
 

Detailed Description

Represents a result of an inline query that was chosen by the user and sent to their chat partner. https://core.telegram.org/bots/api#choseninlineresult.

Note
It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.

Definition at line 9 of file ChosenInlineResult.hpp.

Constructor & Destructor Documentation

◆ ChosenInlineResult() [1/2]

tgbotxx::ChosenInlineResult::ChosenInlineResult ( )
default

◆ ChosenInlineResult() [2/2]

tgbotxx::ChosenInlineResult::ChosenInlineResult ( const nl::json &  json)
inlineexplicit

Definition at line 11 of file ChosenInlineResult.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::ChosenInlineResult::fromJson ( const nl::json &  json)
inline

Deserializes this object from JSON.

Definition at line 44 of file ChosenInlineResult.hpp.

◆ toJson()

nl::json tgbotxx::ChosenInlineResult::toJson ( ) const
inline

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 33 of file ChosenInlineResult.hpp.

Member Data Documentation

◆ from

Ptr<User> tgbotxx::ChosenInlineResult::from

The user that chose the result.

Definition at line 19 of file ChosenInlineResult.hpp.

◆ inlineMessageId

std::string tgbotxx::ChosenInlineResult::inlineMessageId

Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.

Definition at line 26 of file ChosenInlineResult.hpp.

◆ location

Ptr<Location> tgbotxx::ChosenInlineResult::location

Optional. Sender location, only for bots that require user location.

Definition at line 22 of file ChosenInlineResult.hpp.

◆ query

std::string tgbotxx::ChosenInlineResult::query

The query that was used to obtain the result.

Definition at line 29 of file ChosenInlineResult.hpp.

◆ resultId

std::string tgbotxx::ChosenInlineResult::resultId

The unique identifier for the result that was chosen.

Definition at line 16 of file ChosenInlineResult.hpp.


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