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

This object represents an animated emoji that displays a random value. https://core.telegram.org/bots/api#dice. More...

#include <Dice.hpp>

Public Member Functions

 Dice ()=default
 
 Dice (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 emoji
 Emoji on which the dice throw animation is based. More...
 
std::int32_t value {}
 Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji. More...
 

Detailed Description

This object represents an animated emoji that displays a random value. https://core.telegram.org/bots/api#dice.

Definition at line 7 of file Dice.hpp.

Constructor & Destructor Documentation

◆ Dice() [1/2]

tgbotxx::Dice::Dice ( )
default

◆ Dice() [2/2]

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

Definition at line 9 of file Dice.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 30 of file Dice.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 22 of file Dice.hpp.

Member Data Documentation

◆ emoji

std::string tgbotxx::Dice::emoji

Emoji on which the dice throw animation is based.

Definition at line 14 of file Dice.hpp.

◆ value

std::int32_t tgbotxx::Dice::value {}

Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji.

Definition at line 17 of file Dice.hpp.


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