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

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers. https://core.telegram.org/bots/api#game. More...

#include <Game.hpp>

Public Member Functions

 Game ()=default
 
 Game (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::string title
 Title of the game. More...
 
std::string description
 Description of the game. More...
 
std::vector< Ptr< PhotoSize > > photo
 Photo that will be displayed in the game message in chats. More...
 
std::string text
 Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters. More...
 
std::vector< Ptr< MessageEntity > > textEntities
 Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc. More...
 
Ptr< Animationanimation
 Optional. Animation that will be displayed in the game message in chats. Upload via BotFather https://t.me/botfather . More...
 

Detailed Description

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers. https://core.telegram.org/bots/api#game.

Definition at line 9 of file Game.hpp.

Constructor & Destructor Documentation

◆ Game() [1/2]

tgbotxx::Game::Game ( )
default

◆ Game() [2/2]

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

Definition at line 11 of file Game.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 52 of file Game.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 40 of file Game.hpp.

Member Data Documentation

◆ animation

Ptr<Animation> tgbotxx::Game::animation

Optional. Animation that will be displayed in the game message in chats. Upload via BotFather https://t.me/botfather .

Definition at line 35 of file Game.hpp.

◆ description

std::string tgbotxx::Game::description

Description of the game.

Definition at line 19 of file Game.hpp.

◆ photo

std::vector<Ptr<PhotoSize> > tgbotxx::Game::photo

Photo that will be displayed in the game message in chats.

Definition at line 22 of file Game.hpp.

◆ text

std::string tgbotxx::Game::text

Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.

Definition at line 28 of file Game.hpp.

◆ textEntities

std::vector<Ptr<MessageEntity> > tgbotxx::Game::textEntities

Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.

Definition at line 31 of file Game.hpp.

◆ title

std::string tgbotxx::Game::title

Title of the game.

Definition at line 16 of file Game.hpp.


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