9 explicit User(
const nl::json& json) {
51 nl::json user = nl::json::object();
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
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.
void fromJson(const nl::json &json)
bool isBot
True, if this user is a bot.
bool addedToAttachmentMenu
Optional. True, if this user added the bot to the attachment menu.
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.
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.
bool canJoinGroups
Optional. True, if the bot can be invited to groups. Returned only in getMe.