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

This object contains information about one answer option in a poll to be sent. https://core.telegram.org/bots/api#inputpolloption. More...

#include <InputPollOption.hpp>

Public Member Functions

 InputPollOption ()=default
 
 InputPollOption (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::string text
 Option text, 1-100 characters.
 
std::string textParseMode
 Optional. Mode for parsing entities in the text. Currently, only custom emoji entities are allowed.
 
std::vector< Ptr< MessageEntity > > textEntities
 Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode.
 

Detailed Description

This object contains information about one answer option in a poll to be sent. https://core.telegram.org/bots/api#inputpolloption.

Definition at line 8 of file InputPollOption.hpp.

Constructor & Destructor Documentation

◆ InputPollOption() [1/2]

tgbotxx::InputPollOption::InputPollOption ( )
default

◆ InputPollOption() [2/2]

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

Definition at line 10 of file InputPollOption.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 35 of file InputPollOption.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 26 of file InputPollOption.hpp.

Member Data Documentation

◆ text

std::string tgbotxx::InputPollOption::text

Option text, 1-100 characters.

Definition at line 15 of file InputPollOption.hpp.

◆ textEntities

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

Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode.

Definition at line 22 of file InputPollOption.hpp.

◆ textParseMode

std::string tgbotxx::InputPollOption::textParseMode

Optional. Mode for parsing entities in the text. Currently, only custom emoji entities are allowed.

Definition at line 18 of file InputPollOption.hpp.


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