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

This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. https://core.telegram.org/bots/api#chatshared. More...

#include <ChatShared.hpp>

Public Member Functions

 ChatShared ()=default
 
 ChatShared (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 {}
 Identifier of the request. More...
 
std::int64_t chatId {}
 Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means. More...
 

Detailed Description

This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. https://core.telegram.org/bots/api#chatshared.

Definition at line 7 of file ChatShared.hpp.

Constructor & Destructor Documentation

◆ ChatShared() [1/2]

tgbotxx::ChatShared::ChatShared ( )
default

◆ ChatShared() [2/2]

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

Definition at line 9 of file ChatShared.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 33 of file ChatShared.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 25 of file ChatShared.hpp.

Member Data Documentation

◆ chatId

std::int64_t tgbotxx::ChatShared::chatId {}

Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.

Definition at line 21 of file ChatShared.hpp.

◆ requestId

std::int32_t tgbotxx::ChatShared::requestId {}

Identifier of the request.

Definition at line 14 of file ChatShared.hpp.


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