30 nl::json
json = nl::json::object();
#define OBJECT_SERIALIZE_FIELD_PTR(json, json_field, field)
#define OBJECT_DESERIALIZE_FIELD_PTR(json, json_field, field, optional)
#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.
Represents a chat member that has some additional privileges. https://core.telegram....
bool canManageVideoChats
True, if the administrator can manage video chats.
bool canRestrictMembers
True, if the administrator can restrict, ban or unban chat members.
ChatMemberAdministrator(const nl::json &json)
ChatMemberAdministrator()
bool canBeEdited
True, if the bot is allowed to edit administrator privileges of that user.
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
bool canDeleteStories
Optional. True, if the administrator can delete stories posted by other users; channels only.
bool canManageChat
True, if the administrator can access the chat event log, chat statistics, boost list in channels,...
nl::json toJson() const override
Serializes this object to JSON.
bool canEditMessages
Optional. True, if the administrator can edit messages of other users and can pin messages; channels ...
bool canDeleteMessages
True, if the administrator can delete messages of other users.
std::string customTitle
Optional. Custom title for this user.
bool canChangeInfo
True, if the user is allowed to change the chat title, photo and other settings.
bool canPinMessages
Optional. True, if the user is allowed to pin messages; groups and supergroups only.
bool canPromoteMembers
True, if the administrator can add new administrators with a subset of their own privileges or demote...
bool canInviteUsers
True, if the user is allowed to invite new users to the chat.
bool canEditStories
Optional. True, if the administrator can edit stories posted by other users; channels only.
bool isAnonymous
True, if the user's presence in the chat is hidden.
bool canManageTopics
Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups...
bool canPostStories
Optional. True, if the administrator can post stories in the channel; channels only.
bool canPostMessages
Optional. True, if the administrator can post messages in the channel; channels only.
Represents a chat member that was banned in the chat and can't return to the chat or view chat messag...
std::time_t untilDate
Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever...
ChatMemberBanned(const nl::json &json)
nl::json toJson() const override
Serializes this object to JSON.
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
The base class of all chat members objects. This object contains information about one member of a ch...
ChatMember(const nl::json &json)
virtual void fromJson(const nl::json &json)
Deserializes this object from JSON.
virtual ~ChatMember()=default
virtual nl::json toJson() const
Serializes this object to JSON.
Ptr< User > user
Information about the user.
std::string status
The member's status in the chat.
Represents a chat member that isn't currently a member of the chat, but may join it themselves....
nl::json toJson() const override
Serializes this object to JSON.
ChatMemberLeft(const nl::json &json)
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
Represents a chat member that has no additional privileges or restrictions. https://core....
ChatMemberMember(const nl::json &json)
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
nl::json toJson() const override
Serializes this object to JSON.
Represents a chat member that owns the chat and has all administrator privileges. https://core....
ChatMemberOwner(const nl::json &json)
bool isAnonymous
True, if the user's presence in the chat is hidden.
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
nl::json toJson() const override
Serializes this object to JSON.
std::string customTitle
Optional. Custom title for this user.
Represents a chat member that is under certain restrictions in the chat. Supergroups only....
bool canSendMessages
True, if the user is allowed to send text messages, contacts, invoices, locations and venues.
bool canSendAudios
True, if the user is allowed to send audios.
bool canAddWebPagePreviews
True, if the user is allowed to add web page previews to their messages.
bool canSendVideos
True, if the user is allowed to send videos.
bool canManageTopics
True, if the user is allowed to create forum topics.
bool canChangeInfo
True, if the user is allowed to change the chat title, photo and other settings.
nl::json toJson() const override
Serializes this object to JSON.
bool canSendDocuments
True, if the user is allowed to send documents.
bool canSendVideoNotes
True, if the user is allowed to send video notes.
bool isMember
True, if the user is a member of the chat at the moment of the request.
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
bool canSendPhotos
True, if the user is allowed to send photos.
bool canSendOtherMessages
True, if the user is allowed to send animations, games, stickers and use inline bots.
std::time_t untilDate
Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted for...
bool canSendVoiceNotes
True, if the user is allowed to send voice notes.
bool canSendPolls
True, if the user is allowed to send polls.
bool canInviteUsers
True, if the user is allowed to invite new users to the chat.
bool canPinMessages
True, if the user is allowed to pin messages.
ChatMemberRestricted(const nl::json &json)