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

Represents an invite link for a chat. https://core.telegram.org/bots/api#chatinvitelink. More...

#include <ChatInviteLink.hpp>

Public Member Functions

 ChatInviteLink ()=default
 
 ChatInviteLink (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 inviteLink
 The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”. More...
 
Ptr< Usercreator
 Creator of the link. More...
 
bool createsJoinRequest {}
 True, if users joining the chat via the link need to be approved by chat administrators. More...
 
bool isPrimary {}
 True, if the link is primary. More...
 
bool isRevoked {}
 True, if the link is revoked. More...
 
std::string name
 Optional. Invite link name. More...
 
std::time_t expireDate {}
 Optional. Point in time (Unix timestamp) when the link will expire or has been expired. More...
 
std::int32_t memberLimit {}
 Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999. More...
 
std::int32_t pendingJoinRequestCount {}
 Optional. Number of pending join requests created using this link. More...
 

Detailed Description

Represents an invite link for a chat. https://core.telegram.org/bots/api#chatinvitelink.

Definition at line 8 of file ChatInviteLink.hpp.

Constructor & Destructor Documentation

◆ ChatInviteLink() [1/2]

tgbotxx::ChatInviteLink::ChatInviteLink ( )
default

◆ ChatInviteLink() [2/2]

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

Definition at line 10 of file ChatInviteLink.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 59 of file ChatInviteLink.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 44 of file ChatInviteLink.hpp.

Member Data Documentation

◆ createsJoinRequest

bool tgbotxx::ChatInviteLink::createsJoinRequest {}

True, if users joining the chat via the link need to be approved by chat administrators.

Definition at line 21 of file ChatInviteLink.hpp.

◆ creator

Ptr<User> tgbotxx::ChatInviteLink::creator

Creator of the link.

Definition at line 18 of file ChatInviteLink.hpp.

◆ expireDate

std::time_t tgbotxx::ChatInviteLink::expireDate {}

Optional. Point in time (Unix timestamp) when the link will expire or has been expired.

Definition at line 33 of file ChatInviteLink.hpp.

◆ inviteLink

std::string tgbotxx::ChatInviteLink::inviteLink

The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.

Definition at line 15 of file ChatInviteLink.hpp.

◆ isPrimary

bool tgbotxx::ChatInviteLink::isPrimary {}

True, if the link is primary.

Definition at line 24 of file ChatInviteLink.hpp.

◆ isRevoked

bool tgbotxx::ChatInviteLink::isRevoked {}

True, if the link is revoked.

Definition at line 27 of file ChatInviteLink.hpp.

◆ memberLimit

std::int32_t tgbotxx::ChatInviteLink::memberLimit {}

Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999.

Definition at line 36 of file ChatInviteLink.hpp.

◆ name

std::string tgbotxx::ChatInviteLink::name

Optional. Invite link name.

Definition at line 30 of file ChatInviteLink.hpp.

◆ pendingJoinRequestCount

std::int32_t tgbotxx::ChatInviteLink::pendingJoinRequestCount {}

Optional. Number of pending join requests created using this link.

Definition at line 39 of file ChatInviteLink.hpp.


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