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

This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess. https://core.telegram.org/bots/api#writeaccessallowed. More...

#include <WriteAccessAllowed.hpp>

Public Member Functions

 WriteAccessAllowed ()=default
 
 WriteAccessAllowed (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 fromRequest {}
 Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess. More...
 
std::string webAppName
 Optional. Name of the Web App, if the access was granted when the Web App was launched from a link. More...
 
bool fromAttachmentMenu {}
 Optional. True, if the access was granted when the bot was added to the attachment or side menu. More...
 

Detailed Description

This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess. https://core.telegram.org/bots/api#writeaccessallowed.

Definition at line 8 of file WriteAccessAllowed.hpp.

Constructor & Destructor Documentation

◆ WriteAccessAllowed() [1/2]

tgbotxx::WriteAccessAllowed::WriteAccessAllowed ( )
default

◆ WriteAccessAllowed() [2/2]

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

Definition at line 10 of file WriteAccessAllowed.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 34 of file WriteAccessAllowed.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 25 of file WriteAccessAllowed.hpp.

Member Data Documentation

◆ fromAttachmentMenu

bool tgbotxx::WriteAccessAllowed::fromAttachmentMenu {}

Optional. True, if the access was granted when the bot was added to the attachment or side menu.

Definition at line 21 of file WriteAccessAllowed.hpp.

◆ fromRequest

bool tgbotxx::WriteAccessAllowed::fromRequest {}

Optional. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess.

Definition at line 15 of file WriteAccessAllowed.hpp.

◆ webAppName

std::string tgbotxx::WriteAccessAllowed::webAppName

Optional. Name of the Web App, if the access was granted when the Web App was launched from a link.

Definition at line 18 of file WriteAccessAllowed.hpp.


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