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

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. https://core.telegram.org/bots/api#inlinequery. More...

#include <InlineQuery.hpp>

Public Member Functions

 InlineQuery ()=default
 
 InlineQuery (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 id
 Unique identifier for this query. More...
 
Ptr< Userfrom
 Sender. More...
 
std::string query
 Text of the query (up to 256 characters) More...
 
std::string offset
 Offset of the results to be returned, can be controlled by the bot. More...
 
std::string chatType
 Optional. Type of the chat, from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat. More...
 
Ptr< Locationlocation
 Optional. Sender location, only for bots that request user location. More...
 

Detailed Description

This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. https://core.telegram.org/bots/api#inlinequery.

Definition at line 10 of file InlineQuery.hpp.

Constructor & Destructor Documentation

◆ InlineQuery() [1/2]

tgbotxx::InlineQuery::InlineQuery ( )
default

◆ InlineQuery() [2/2]

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

Definition at line 12 of file InlineQuery.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 50 of file InlineQuery.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 38 of file InlineQuery.hpp.

Member Data Documentation

◆ chatType

std::string tgbotxx::InlineQuery::chatType

Optional. Type of the chat, from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat.

Definition at line 31 of file InlineQuery.hpp.

◆ from

Ptr<User> tgbotxx::InlineQuery::from

Sender.

Definition at line 20 of file InlineQuery.hpp.

◆ id

std::string tgbotxx::InlineQuery::id

Unique identifier for this query.

Definition at line 17 of file InlineQuery.hpp.

◆ location

Ptr<Location> tgbotxx::InlineQuery::location

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

Definition at line 34 of file InlineQuery.hpp.

◆ offset

std::string tgbotxx::InlineQuery::offset

Offset of the results to be returned, can be controlled by the bot.

Definition at line 26 of file InlineQuery.hpp.

◆ query

std::string tgbotxx::InlineQuery::query

Text of the query (up to 256 characters)

Definition at line 23 of file InlineQuery.hpp.


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