tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::ChatMember Struct Reference

The base class of all chat members objects. This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported: ChatMemberOwner ChatMemberAdministrator ChatMemberMember ChatMemberRestricted ChatMemberLeft ChatMemberBanned https://core.telegram.org/bots/api#chatmember. More...

#include <ChatMember.hpp>

Inheritance diagram for tgbotxx::ChatMember:
tgbotxx::ChatMemberAdministrator tgbotxx::ChatMemberBanned tgbotxx::ChatMemberLeft tgbotxx::ChatMemberMember tgbotxx::ChatMemberOwner tgbotxx::ChatMemberRestricted

Public Member Functions

 ChatMember ()=default
 
 ChatMember (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON. More...
 

Public Attributes

std::string status
 The member's status in the chat. More...
 
Ptr< Useruser
 Information about the user. More...
 

Detailed Description

The base class of all chat members objects. This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported: ChatMemberOwner ChatMemberAdministrator ChatMemberMember ChatMemberRestricted ChatMemberLeft ChatMemberBanned https://core.telegram.org/bots/api#chatmember.

Definition at line 15 of file ChatMember.hpp.

Constructor & Destructor Documentation

◆ ChatMember() [1/2]

tgbotxx::ChatMember::ChatMember ( )
default

◆ ChatMember() [2/2]

tgbotxx::ChatMember::ChatMember ( const nl::json &  json)
inlineexplicit

Definition at line 17 of file ChatMember.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::ChatMember::fromJson ( const nl::json &  json)
inline

Deserializes this object from JSON.

Definition at line 37 of file ChatMember.hpp.

◆ toJson()

nl::json tgbotxx::ChatMember::toJson ( ) const
inline

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 29 of file ChatMember.hpp.

Member Data Documentation

◆ status

std::string tgbotxx::ChatMember::status

The member's status in the chat.

Definition at line 22 of file ChatMember.hpp.

◆ user

Ptr<User> tgbotxx::ChatMember::user

Information about the user.

Definition at line 25 of file ChatMember.hpp.


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