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

This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. More about requesting chats » https://core.telegram.org/bots/features#chat-and-user-selection 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. More...
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON. More...
 

Public Attributes

std::int32_t requestId {}
 Signed 32-bit identifier of the request, which will be received back in the ChatShared object. More...
 
bool chatIsChannel {}
 Pass True to request a channel chat, pass False to request a group or a supergroup chat. More...
 
bool chatIsForum {}
 Optional. Pass True to request a forum supergroup, pass False to request a non-forum chat. If not specified, no additional restrictions are applied. More...
 
bool chatHasUsername {}
 Optional. Pass True to request a supergroup or a channel with a username, pass False to request a chat without a username. If not specified, no additional restrictions are applied. More...
 
bool chatIsCreated {}
 Optional. Pass True to request a chat owned by the user. Otherwise, no additional restrictions are applied. More...
 
Ptr< ChatAdministratorRightsuserAdministratorRights
 Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied. More...
 
Ptr< ChatAdministratorRightsbotAdministratorRights
 Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied. More...
 
bool botIsMember {}
 Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied. More...
 

Detailed Description

This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. More about requesting chats » https://core.telegram.org/bots/features#chat-and-user-selection 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 64 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 50 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. The rights must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.

Definition at line 42 of file KeyboardButtonRequestChat.hpp.

◆ botIsMember

bool tgbotxx::KeyboardButtonRequestChat::botIsMember {}

Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.

Definition at line 45 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. If not specified, no additional restrictions are applied.

Definition at line 29 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. Otherwise, no additional restrictions are applied.

Definition at line 32 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. If not specified, no additional restrictions are applied.

Definition at line 25 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.

Note
Must be unique within the message

Definition at line 18 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. The rights must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.

Definition at line 37 of file KeyboardButtonRequestChat.hpp.


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