tgbotxx 1.1.9.2
Telegram Bot C++ Library
Loading...
Searching...
No Matches
tgbotxx::KeyboardButtonRequestUsers Struct Reference

TThis object defines the criteria used to request suitable users. Information about the selected users 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#keyboardbuttonrequestusers. More...

#include <KeyboardButtonRequestUsers.hpp>

Public Member Functions

 KeyboardButtonRequestUsers ()=default
 
 KeyboardButtonRequestUsers (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON.
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON.
 

Public Attributes

std::int32_t requestId {}
 Signed 32-bit identifier of the request, which will be received back in the UsersShared object. https://core.telegram.org/bots/api#usersshared.
 
bool userIsBot {}
 Optional. Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.
 
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.
 
std::int32_t maxQuantity {1}
 Optional. The maximum number of users to be selected; 1-10. Defaults to 1.
 
bool requestName {}
 Optional. Pass True to request the users' first and last names.
 
bool requestUsername {}
 Optional. Pass True to request the users' usernames.
 
bool requestPhoto {}
 Optional. Pass True to request the users' photos.
 

Detailed Description

TThis object defines the criteria used to request suitable users. Information about the selected users 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#keyboardbuttonrequestusers.

Definition at line 9 of file KeyboardButtonRequestUsers.hpp.

Constructor & Destructor Documentation

◆ KeyboardButtonRequestUsers() [1/2]

tgbotxx::KeyboardButtonRequestUsers::KeyboardButtonRequestUsers ( )
default

◆ KeyboardButtonRequestUsers() [2/2]

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

Definition at line 11 of file KeyboardButtonRequestUsers.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 54 of file KeyboardButtonRequestUsers.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 41 of file KeyboardButtonRequestUsers.hpp.

Member Data Documentation

◆ maxQuantity

std::int32_t tgbotxx::KeyboardButtonRequestUsers::maxQuantity {1}

Optional. The maximum number of users to be selected; 1-10. Defaults to 1.

Definition at line 27 of file KeyboardButtonRequestUsers.hpp.

◆ requestId

std::int32_t tgbotxx::KeyboardButtonRequestUsers::requestId {}

Signed 32-bit identifier of the request, which will be received back in the UsersShared object. https://core.telegram.org/bots/api#usersshared.

Note
Must be unique within the message

Definition at line 18 of file KeyboardButtonRequestUsers.hpp.

◆ requestName

bool tgbotxx::KeyboardButtonRequestUsers::requestName {}

Optional. Pass True to request the users' first and last names.

Definition at line 30 of file KeyboardButtonRequestUsers.hpp.

◆ requestPhoto

bool tgbotxx::KeyboardButtonRequestUsers::requestPhoto {}

Optional. Pass True to request the users' photos.

Definition at line 36 of file KeyboardButtonRequestUsers.hpp.

◆ requestUsername

bool tgbotxx::KeyboardButtonRequestUsers::requestUsername {}

Optional. Pass True to request the users' usernames.

Definition at line 33 of file KeyboardButtonRequestUsers.hpp.

◆ userIsBot

bool tgbotxx::KeyboardButtonRequestUsers::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 21 of file KeyboardButtonRequestUsers.hpp.

◆ userIsPremium

bool tgbotxx::KeyboardButtonRequestUsers::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 24 of file KeyboardButtonRequestUsers.hpp.


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