This object represents a Telegram user or bot. https://core.telegram.org/bots/api#user.
More...
#include <User.hpp>
|
| | User ()=default |
| |
| | User (const nl::json &json) |
| |
| nl::json | toJson () const |
| | Serializes this object to JSON.
|
| |
| void | fromJson (const nl::json &json) |
| | Deserializes this object from JSON.
|
| |
|
| std::int64_t | id {} |
| | Unique identifier for this user or bot. 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.
|
| |
| bool | isBot {} |
| | True, if this user is a bot.
|
| |
| std::string | firstName |
| | User's or bot's first name.
|
| |
| std::string | lastName |
| | Optional. User's or bot's last name.
|
| |
| std::string | username |
| | Optional. User's or bot's username.
|
| |
| std::string | languageCode |
| | Optional. IETF language tag of the user's language https://en.wikipedia.org/wiki/IETF_language_tag.
|
| |
| bool | isPremium {} |
| | Optional. True, if this user is a Telegram Premium user.
|
| |
| bool | addedToAttachmentMenu {} |
| | Optional. True, if this user added the bot to the attachment menu.
|
| |
| bool | canJoinGroups {} |
| | Optional. True, if the bot can be invited to groups. Returned only in getMe.
|
| |
| bool | canReadAllGroupMessages {} |
| | Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
|
| |
| bool | supportsInlineQueries {} |
| | Optional. True, if the bot supports inline queries. Returned only in getMe.
|
| |
| bool | canConnectToBusiness {} |
| | Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.
|
| |
| bool | hasMainWebApp {} |
| | Optional. True, if the bot has a main Web App. Returned only in getMe.
|
| |
This object represents a Telegram user or bot. https://core.telegram.org/bots/api#user.
Definition at line 7 of file User.hpp.
◆ User() [1/2]
◆ User() [2/2]
| tgbotxx::User::User |
( |
const nl::json & |
json | ) |
|
|
explicit |
◆ fromJson()
| void tgbotxx::User::fromJson |
( |
const nl::json & |
json | ) |
|
Deserializes this object from JSON.
◆ toJson()
| nl::json tgbotxx::User::toJson |
( |
| ) |
const |
Serializes this object to JSON.
- Returns
- JSON representation of this object
◆ addedToAttachmentMenu
| bool tgbotxx::User::addedToAttachmentMenu {} |
Optional. True, if this user added the bot to the attachment menu.
Definition at line 37 of file User.hpp.
◆ canConnectToBusiness
| bool tgbotxx::User::canConnectToBusiness {} |
Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.
Definition at line 49 of file User.hpp.
◆ canJoinGroups
| bool tgbotxx::User::canJoinGroups {} |
Optional. True, if the bot can be invited to groups. Returned only in getMe.
Definition at line 40 of file User.hpp.
◆ canReadAllGroupMessages
| bool tgbotxx::User::canReadAllGroupMessages {} |
Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
Definition at line 43 of file User.hpp.
◆ firstName
| std::string tgbotxx::User::firstName |
◆ hasMainWebApp
| bool tgbotxx::User::hasMainWebApp {} |
Optional. True, if the bot has a main Web App. Returned only in getMe.
Definition at line 52 of file User.hpp.
◆ id
| std::int64_t tgbotxx::User::id {} |
Unique identifier for this user or bot. 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.
Definition at line 15 of file User.hpp.
◆ isBot
| bool tgbotxx::User::isBot {} |
True, if this user is a bot.
Definition at line 18 of file User.hpp.
◆ isPremium
| bool tgbotxx::User::isPremium {} |
Optional. True, if this user is a Telegram Premium user.
Definition at line 34 of file User.hpp.
◆ languageCode
| std::string tgbotxx::User::languageCode |
◆ lastName
| std::string tgbotxx::User::lastName |
Optional. User's or bot's last name.
Definition at line 24 of file User.hpp.
◆ supportsInlineQueries
| bool tgbotxx::User::supportsInlineQueries {} |
Optional. True, if the bot supports inline queries. Returned only in getMe.
Definition at line 46 of file User.hpp.
◆ username
| std::string tgbotxx::User::username |
Optional. User's or bot's username.
Definition at line 27 of file User.hpp.
The documentation for this struct was generated from the following file: