tgbot-cpp
Loading...
Searching...
No Matches
TgBot::SharedUser Struct Reference

This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button. More...

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<SharedUser>

Public Attributes

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 64-bit integers or double-precision float types are safe for storing these identifiers. 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.
std::optional< std::string > firstName { }
 Optional. First name of the user, if the name was requested by the bot.
std::optional< std::string > lastName { }
 Optional. Last name of the user, if the name was requested by the bot.
std::optional< std::string > username { }
 Optional. Username of the user, if the username was requested by the bot.
std::optional< std::vector< std::shared_ptr< PhotoSize > > > photo { }
 Optional. Available sizes of the chat photo, if the photo was requested by the bot.

Detailed Description

This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.

Definition at line 13124 of file Types.h.

Member Typedef Documentation

◆ Ptr

using TgBot::SharedUser::Ptr = std::shared_ptr<SharedUser>

Definition at line 13125 of file Types.h.

Member Data Documentation

◆ firstName

std::optional<std::string> TgBot::SharedUser::firstName { }

Optional. First name of the user, if the name was requested by the bot.

Definition at line 13140 of file Types.h.

◆ lastName

std::optional<std::string> TgBot::SharedUser::lastName { }

Optional. Last name of the user, if the name was requested by the bot.

Definition at line 13145 of file Types.h.

◆ photo

std::optional<std::vector<std::shared_ptr<PhotoSize> > > TgBot::SharedUser::photo { }

Optional. Available sizes of the chat photo, if the photo was requested by the bot.

Definition at line 13155 of file Types.h.

◆ userId

std::int64_t TgBot::SharedUser::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 64-bit integers or double-precision float types are safe for storing these identifiers. 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 13135 of file Types.h.

◆ username

std::optional<std::string> TgBot::SharedUser::username { }

Optional. Username of the user, if the username was requested by the bot.

Definition at line 13150 of file Types.h.


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