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

This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button. https://core.telegram.org/bots/api#usersshared. More...

#include <UsersShared.hpp>

Public Member Functions

 UsersShared ()=default
 
 UsersShared (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 {}
 Identifier of the request.
 
std::vector< Ptr< SharedUser > > users
 Information about users shared with the bot.
 
std::int64_t userId {}
 Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.
 

Detailed Description

This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button. https://core.telegram.org/bots/api#usersshared.

Definition at line 8 of file UsersShared.hpp.

Constructor & Destructor Documentation

◆ UsersShared() [1/2]

tgbotxx::UsersShared::UsersShared ( )
default

◆ UsersShared() [2/2]

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

Definition at line 10 of file UsersShared.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 37 of file UsersShared.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 29 of file UsersShared.hpp.

Member Data Documentation

◆ requestId

std::int32_t tgbotxx::UsersShared::requestId {}

Identifier of the request.

Definition at line 15 of file UsersShared.hpp.

◆ userId

std::int64_t tgbotxx::UsersShared::userId {}

Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.

Definition at line 25 of file UsersShared.hpp.

◆ users

std::vector<Ptr<SharedUser> > tgbotxx::UsersShared::users

Information about users shared with the bot.

Definition at line 18 of file UsersShared.hpp.


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