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

Represents a join request sent to a chat. https://core.telegram.org/bots/api#chatjoinrequest. More...

#include <ChatJoinRequest.hpp>

Public Member Functions

 ChatJoinRequest ()=default
 
 ChatJoinRequest (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

Ptr< Chatchat
 Chat to which the request was sent. More...
 
Ptr< Userfrom
 User that sent the join request. More...
 
std::int64_t userChatId {}
 Identifier of a private chat with the user who sent the join request. 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. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user. More...
 
std::time_t date {}
 Date the request was sent in Unix time. More...
 
std::string bio
 Optional. Bio of the user. More...
 
Ptr< ChatInviteLinkinviteLink
 Optional. Chat invite link that was used by the user to send the join request. More...
 

Detailed Description

Represents a join request sent to a chat. https://core.telegram.org/bots/api#chatjoinrequest.

Definition at line 11 of file ChatJoinRequest.hpp.

Constructor & Destructor Documentation

◆ ChatJoinRequest() [1/2]

tgbotxx::ChatJoinRequest::ChatJoinRequest ( )
default

◆ ChatJoinRequest() [2/2]

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

Definition at line 13 of file ChatJoinRequest.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 53 of file ChatJoinRequest.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 41 of file ChatJoinRequest.hpp.

Member Data Documentation

◆ bio

std::string tgbotxx::ChatJoinRequest::bio

Optional. Bio of the user.

Definition at line 33 of file ChatJoinRequest.hpp.

◆ chat

Ptr<Chat> tgbotxx::ChatJoinRequest::chat

Chat to which the request was sent.

Definition at line 18 of file ChatJoinRequest.hpp.

◆ date

std::time_t tgbotxx::ChatJoinRequest::date {}

Date the request was sent in Unix time.

Definition at line 30 of file ChatJoinRequest.hpp.

◆ from

Ptr<User> tgbotxx::ChatJoinRequest::from

User that sent the join request.

Definition at line 21 of file ChatJoinRequest.hpp.

◆ inviteLink

Ptr<ChatInviteLink> tgbotxx::ChatJoinRequest::inviteLink

Optional. Chat invite link that was used by the user to send the join request.

Definition at line 36 of file ChatJoinRequest.hpp.

◆ userChatId

std::int64_t tgbotxx::ChatJoinRequest::userChatId {}

Identifier of a private chat with the user who sent the join request. 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. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.

Definition at line 27 of file ChatJoinRequest.hpp.


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