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

This object contains information about the quoted part of a message that is replied to by the given message. https://core.telegram.org/bots/api#textquote. More...

#include <TextQuote.hpp>

Public Member Functions

 TextQuote ()=default
 
 TextQuote (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
 Text of the quoted part of a message that is replied to by the given message.
 
std::vector< Ptr< MessageEntity > > entities
 Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.
 
std::int32_t position {}
 Approximate quote position in the original message in UTF-16 code units as specified by the sender.
 
bool isManual {}
 Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.
 

Detailed Description

This object contains information about the quoted part of a message that is replied to by the given message. https://core.telegram.org/bots/api#textquote.

Definition at line 8 of file TextQuote.hpp.

Constructor & Destructor Documentation

◆ TextQuote() [1/2]

tgbotxx::TextQuote::TextQuote ( )
default

◆ TextQuote() [2/2]

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

Definition at line 10 of file TextQuote.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 39 of file TextQuote.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 29 of file TextQuote.hpp.

Member Data Documentation

◆ entities

std::vector<Ptr<MessageEntity> > tgbotxx::TextQuote::entities

Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.

Definition at line 19 of file TextQuote.hpp.

◆ isManual

bool tgbotxx::TextQuote::isManual {}

Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.

Definition at line 25 of file TextQuote.hpp.

◆ position

std::int32_t tgbotxx::TextQuote::position {}

Approximate quote position in the original message in UTF-16 code units as specified by the sender.

Definition at line 22 of file TextQuote.hpp.

◆ text

std::string tgbotxx::TextQuote::text

Text of the quoted part of a message that is replied to by the given message.

Definition at line 15 of file TextQuote.hpp.


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