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

The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. https://core.telegram.org/bots/api#chatboostsourcegiveaway. More...

#include <ChatBoostSource.hpp>

Inheritance diagram for tgbotxx::ChatBoostSourceGiveaway:
tgbotxx::ChatBoostSource

Public Member Functions

 ChatBoostSourceGiveaway ()
 
 ChatBoostSourceGiveaway (const nl::json &json)
 
nl::json toJson () const override
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json) override
 Deserializes this object from JSON. More...
 
- Public Member Functions inherited from tgbotxx::ChatBoostSource
 ChatBoostSource ()=default
 
 ChatBoostSource (const nl::json &json)
 

Public Attributes

std::int32_t giveawayMessageId {}
 Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet. More...
 
Ptr< Useruser
 Optional. User that won the prize in the giveaway if any. More...
 
bool isUnclaimed {}
 Optional. True, if the giveaway was completed, but there was no user to win the prize. More...
 
- Public Attributes inherited from tgbotxx::ChatBoostSource
std::string source
 Source of the boost. More...
 

Detailed Description

The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. https://core.telegram.org/bots/api#chatboostsourcegiveaway.

Definition at line 93 of file ChatBoostSource.hpp.

Constructor & Destructor Documentation

◆ ChatBoostSourceGiveaway() [1/2]

tgbotxx::ChatBoostSourceGiveaway::ChatBoostSourceGiveaway ( )
inline

Definition at line 94 of file ChatBoostSource.hpp.

◆ ChatBoostSourceGiveaway() [2/2]

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

Definition at line 97 of file ChatBoostSource.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::ChatBoostSourceGiveaway::fromJson ( const nl::json &  json)
inlineoverridevirtual

Deserializes this object from JSON.

Reimplemented from tgbotxx::ChatBoostSource.

Definition at line 119 of file ChatBoostSource.hpp.

◆ toJson()

nl::json tgbotxx::ChatBoostSourceGiveaway::toJson ( ) const
inlineoverridevirtual

Serializes this object to JSON.

Returns
JSON representation of this object

Reimplemented from tgbotxx::ChatBoostSource.

Definition at line 112 of file ChatBoostSource.hpp.

Member Data Documentation

◆ giveawayMessageId

std::int32_t tgbotxx::ChatBoostSourceGiveaway::giveawayMessageId {}

Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet.

Definition at line 104 of file ChatBoostSource.hpp.

◆ isUnclaimed

bool tgbotxx::ChatBoostSourceGiveaway::isUnclaimed {}

Optional. True, if the giveaway was completed, but there was no user to win the prize.

Definition at line 110 of file ChatBoostSource.hpp.

◆ user

Ptr<User> tgbotxx::ChatBoostSourceGiveaway::user

Optional. User that won the prize in the giveaway if any.

Definition at line 107 of file ChatBoostSource.hpp.


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