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

Describes actions that a non-administrator user is allowed to take in a chat. https://core.telegram.org/bots/api#chatpermissions. More...

#include <ChatPermissions.hpp>

Public Member Functions

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

bool canSendMessages {}
 Optional. True, if the user is allowed to send text messages, contacts, invoices, locations and venues. More...
 
bool canSendAudios {}
 Optional. True, if the user is allowed to send audios. More...
 
bool canSendDocuments {}
 Optional. True, if the user is allowed to send documents. More...
 
bool canSendPhotos {}
 Optional. True, if the user is allowed to send photos. More...
 
bool canSendVideos {}
 Optional. True, if the user is allowed to send videos. More...
 
bool canSendVideoNotes {}
 Optional. True, if the user is allowed to send video notes. More...
 
bool canSendVoiceNotes {}
 Optional. True, if the user is allowed to send voice notes. More...
 
bool canSendPolls {}
 Optional. True, if the user is allowed to send polls. More...
 
bool canSendOtherMessages {}
 Optional. True, if the user is allowed to send animations, games, stickers and use inline bots. More...
 
bool canAddWebPagePreviews {}
 Optional. True, if the user is allowed to add web page previews to their messages. More...
 
bool canChangeInfo {}
 Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups. More...
 
bool canInviteUsers {}
 Optional. True, if the user is allowed to invite new users to the chat. More...
 
bool canPinMessages {}
 Optional. True, if the user is allowed to pin messages. Ignored in public supergroups. More...
 
bool canManageTopics {}
 Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of canPinMessages. More...
 

Detailed Description

Describes actions that a non-administrator user is allowed to take in a chat. https://core.telegram.org/bots/api#chatpermissions.

Definition at line 7 of file ChatPermissions.hpp.

Constructor & Destructor Documentation

◆ ChatPermissions() [1/2]

tgbotxx::ChatPermissions::ChatPermissions ( )
default

◆ ChatPermissions() [2/2]

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

Definition at line 9 of file ChatPermissions.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 78 of file ChatPermissions.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 58 of file ChatPermissions.hpp.

Member Data Documentation

◆ canAddWebPagePreviews

bool tgbotxx::ChatPermissions::canAddWebPagePreviews {}

Optional. True, if the user is allowed to add web page previews to their messages.

Definition at line 41 of file ChatPermissions.hpp.

◆ canChangeInfo

bool tgbotxx::ChatPermissions::canChangeInfo {}

Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups.

Definition at line 44 of file ChatPermissions.hpp.

◆ canInviteUsers

bool tgbotxx::ChatPermissions::canInviteUsers {}

Optional. True, if the user is allowed to invite new users to the chat.

Definition at line 47 of file ChatPermissions.hpp.

◆ canManageTopics

bool tgbotxx::ChatPermissions::canManageTopics {}

Optional. True, if the user is allowed to create forum topics. If omitted defaults to the value of canPinMessages.

Definition at line 53 of file ChatPermissions.hpp.

◆ canPinMessages

bool tgbotxx::ChatPermissions::canPinMessages {}

Optional. True, if the user is allowed to pin messages. Ignored in public supergroups.

Definition at line 50 of file ChatPermissions.hpp.

◆ canSendAudios

bool tgbotxx::ChatPermissions::canSendAudios {}

Optional. True, if the user is allowed to send audios.

Definition at line 17 of file ChatPermissions.hpp.

◆ canSendDocuments

bool tgbotxx::ChatPermissions::canSendDocuments {}

Optional. True, if the user is allowed to send documents.

Definition at line 20 of file ChatPermissions.hpp.

◆ canSendMessages

bool tgbotxx::ChatPermissions::canSendMessages {}

Optional. True, if the user is allowed to send text messages, contacts, invoices, locations and venues.

Definition at line 14 of file ChatPermissions.hpp.

◆ canSendOtherMessages

bool tgbotxx::ChatPermissions::canSendOtherMessages {}

Optional. True, if the user is allowed to send animations, games, stickers and use inline bots.

Definition at line 38 of file ChatPermissions.hpp.

◆ canSendPhotos

bool tgbotxx::ChatPermissions::canSendPhotos {}

Optional. True, if the user is allowed to send photos.

Definition at line 23 of file ChatPermissions.hpp.

◆ canSendPolls

bool tgbotxx::ChatPermissions::canSendPolls {}

Optional. True, if the user is allowed to send polls.

Definition at line 35 of file ChatPermissions.hpp.

◆ canSendVideoNotes

bool tgbotxx::ChatPermissions::canSendVideoNotes {}

Optional. True, if the user is allowed to send video notes.

Definition at line 29 of file ChatPermissions.hpp.

◆ canSendVideos

bool tgbotxx::ChatPermissions::canSendVideos {}

Optional. True, if the user is allowed to send videos.

Definition at line 26 of file ChatPermissions.hpp.

◆ canSendVoiceNotes

bool tgbotxx::ChatPermissions::canSendVoiceNotes {}

Optional. True, if the user is allowed to send voice notes.

Definition at line 32 of file ChatPermissions.hpp.


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