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

This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. More about requesting users » https://core.telegram.org/bots/features#chat-and-user-selection https://core.telegram.org/bots/api#keyboardbuttonrequestuser. More...

#include <KeyboardButtonRequestUser.hpp>

Public Member Functions

 KeyboardButtonRequestUser ()=default
 
 KeyboardButtonRequestUser (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::int32_t requestId {}
 Signed 32-bit identifier of the request, which will be received back in the UserShared object. More...
 
bool userIsBot {}
 Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied. More...
 
bool userIsPremium {}
 Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied. More...
 

Detailed Description

This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. More about requesting users » https://core.telegram.org/bots/features#chat-and-user-selection https://core.telegram.org/bots/api#keyboardbuttonrequestuser.

Definition at line 9 of file KeyboardButtonRequestUser.hpp.

Constructor & Destructor Documentation

◆ KeyboardButtonRequestUser() [1/2]

tgbotxx::KeyboardButtonRequestUser::KeyboardButtonRequestUser ( )
default

◆ KeyboardButtonRequestUser() [2/2]

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

Definition at line 11 of file KeyboardButtonRequestUser.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 37 of file KeyboardButtonRequestUser.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 28 of file KeyboardButtonRequestUser.hpp.

Member Data Documentation

◆ requestId

std::int32_t tgbotxx::KeyboardButtonRequestUser::requestId {}

Signed 32-bit identifier of the request, which will be received back in the UserShared object.

Note
Must be unique within the message

Definition at line 17 of file KeyboardButtonRequestUser.hpp.

◆ userIsBot

bool tgbotxx::KeyboardButtonRequestUser::userIsBot {}

Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.

Definition at line 20 of file KeyboardButtonRequestUser.hpp.

◆ userIsPremium

bool tgbotxx::KeyboardButtonRequestUser::userIsPremium {}

Optional. Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.

Definition at line 23 of file KeyboardButtonRequestUser.hpp.


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