9 explicit User(
const nl::json& json);
56 [[nodiscard]] nl::json
toJson()
const;
This object represents a Telegram user or bot. https://core.telegram.org/bots/api#user.
std::string lastName
Optional. User's or bot's last name.
std::string languageCode
Optional. IETF language tag of the user's language https://en.wikipedia.org/wiki/IETF_language_tag.
void fromJson(const nl::json &json)
Deserializes this object from JSON.
bool isBot
True, if this user is a bot.
bool addedToAttachmentMenu
Optional. True, if this user added the bot to the attachment menu.
bool canConnectToBusiness
Optional. True, if the bot can be connected to a Telegram Business account to receive its messages....
std::string firstName
User's or bot's first name.
bool canReadAllGroupMessages
Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
bool hasMainWebApp
Optional. True, if the bot has a main Web App. Returned only in getMe.
User(const nl::json &json)
bool supportsInlineQueries
Optional. True, if the bot supports inline queries. Returned only in getMe.
bool isPremium
Optional. True, if this user is a Telegram Premium user.
std::string username
Optional. User's or bot's username.
nl::json toJson() const
Serializes this object to JSON.
bool canJoinGroups
Optional. True, if the bot can be invited to groups. Returned only in getMe.