tgbotxx 1.1.9.2
Telegram Bot C++ Library
Loading...
Searching...
No Matches
tgbotxx::KeyboardButtonRequestChat Struct Reference

This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. https://core.telegram.org/bots/api#keyboardbuttonrequestchat. More...

#include <KeyboardButtonRequestChat.hpp>

Public Member Functions

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

Public Attributes

std::int32_t requestId {}
 Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message.
 
bool chatIsChannel {}
 Pass True to request a channel chat, pass False to request a group or a supergroup chat.
 
bool chatIsForum {}
 Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat.
 
bool chatHasUsername {}
 Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username.
 
bool chatIsCreated {}
 Optional. Pass True to request a chat owned by the user.
 
Ptr< ChatAdministratorRightsuserAdministratorRights
 Optional. A JSON-serialized object listing the required administrator rights of the user in the chat.
 
Ptr< ChatAdministratorRightsbotAdministratorRights
 Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat.
 
bool botIsMember {}
 Optional. Pass True to request a chat with the bot as a member.
 
bool requestTitle {}
 Optional. Pass True to request the chat's title.
 
bool requestUsername {}
 Optional. Pass True to request the chat's username.
 
bool requestPhoto {}
 Optional. Pass True to request the chat's photo.
 

Detailed Description

This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. https://core.telegram.org/bots/api#keyboardbuttonrequestchat.

Definition at line 10 of file KeyboardButtonRequestChat.hpp.

Constructor & Destructor Documentation

◆ KeyboardButtonRequestChat() [1/2]

tgbotxx::KeyboardButtonRequestChat::KeyboardButtonRequestChat ( )
default

◆ KeyboardButtonRequestChat() [2/2]

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

Definition at line 12 of file KeyboardButtonRequestChat.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 69 of file KeyboardButtonRequestChat.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 52 of file KeyboardButtonRequestChat.hpp.

Member Data Documentation

◆ botAdministratorRights

Ptr<ChatAdministratorRights> tgbotxx::KeyboardButtonRequestChat::botAdministratorRights

Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat.

Definition at line 36 of file KeyboardButtonRequestChat.hpp.

◆ botIsMember

bool tgbotxx::KeyboardButtonRequestChat::botIsMember {}

Optional. Pass True to request a chat with the bot as a member.

Definition at line 39 of file KeyboardButtonRequestChat.hpp.

◆ chatHasUsername

bool tgbotxx::KeyboardButtonRequestChat::chatHasUsername {}

Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username.

Definition at line 27 of file KeyboardButtonRequestChat.hpp.

◆ chatIsChannel

bool tgbotxx::KeyboardButtonRequestChat::chatIsChannel {}

Pass True to request a channel chat, pass False to request a group or a supergroup chat.

Definition at line 21 of file KeyboardButtonRequestChat.hpp.

◆ chatIsCreated

bool tgbotxx::KeyboardButtonRequestChat::chatIsCreated {}

Optional. Pass True to request a chat owned by the user.

Definition at line 30 of file KeyboardButtonRequestChat.hpp.

◆ chatIsForum

bool tgbotxx::KeyboardButtonRequestChat::chatIsForum {}

Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat.

Definition at line 24 of file KeyboardButtonRequestChat.hpp.

◆ requestId

std::int32_t tgbotxx::KeyboardButtonRequestChat::requestId {}

Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message.

Definition at line 18 of file KeyboardButtonRequestChat.hpp.

◆ requestPhoto

bool tgbotxx::KeyboardButtonRequestChat::requestPhoto {}

Optional. Pass True to request the chat's photo.

Definition at line 48 of file KeyboardButtonRequestChat.hpp.

◆ requestTitle

bool tgbotxx::KeyboardButtonRequestChat::requestTitle {}

Optional. Pass True to request the chat's title.

Definition at line 42 of file KeyboardButtonRequestChat.hpp.

◆ requestUsername

bool tgbotxx::KeyboardButtonRequestChat::requestUsername {}

Optional. Pass True to request the chat's username.

Definition at line 45 of file KeyboardButtonRequestChat.hpp.

◆ userAdministratorRights

Ptr<ChatAdministratorRights> tgbotxx::KeyboardButtonRequestChat::userAdministratorRights

Optional. A JSON-serialized object listing the required administrator rights of the user in the chat.

Definition at line 33 of file KeyboardButtonRequestChat.hpp.


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