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

This object represents a message about the completion of a giveaway with public winners. https://core.telegram.org/bots/api#giveawaywinners. More...

#include <GiveawayWinners.hpp>

Public Member Functions

 GiveawayWinners ()=default
 
 GiveawayWinners (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

Ptr< Chatchat
 The chat that created the giveaway.
 
std::int32_t giveawayMessageId {}
 Identifier of the message with the giveaway in the chat.
 
std::time_t winnersSelectionDate {}
 Point in time (Unix timestamp) when winners of the giveaway were selected.
 
std::int32_t winnerCount {}
 Total number of winners in the giveaway.
 
std::vector< Ptr< User > > winners
 List of up to 100 winners of the giveaway.
 
std::int32_t additionalChatCount {}
 Optional. The number of other chats the user had to join in order to be eligible for the giveaway.
 
std::int64_t prizeStarCount {}
 Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only.
 
std::int32_t premiumSubscriptionMonthCount {}
 Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only.
 
std::int32_t unclaimedPrizeCount {}
 Optional. Number of undistributed prizes.
 
bool onlyNewMembers {}
 Optional. True, if only users who had joined the chats after the giveaway started were eligible to win.
 
bool wasRefunded {}
 Optional. True, if the giveaway was canceled because the payment for it was refunded.
 
std::string prizeDescription {}
 Optional. Description of additional giveaway prize.
 

Detailed Description

This object represents a message about the completion of a giveaway with public winners. https://core.telegram.org/bots/api#giveawaywinners.

Definition at line 9 of file GiveawayWinners.hpp.

Constructor & Destructor Documentation

◆ GiveawayWinners() [1/2]

tgbotxx::GiveawayWinners::GiveawayWinners ( )
default

◆ GiveawayWinners() [2/2]

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

Definition at line 11 of file GiveawayWinners.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 72 of file GiveawayWinners.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 54 of file GiveawayWinners.hpp.

Member Data Documentation

◆ additionalChatCount

std::int32_t tgbotxx::GiveawayWinners::additionalChatCount {}

Optional. The number of other chats the user had to join in order to be eligible for the giveaway.

Definition at line 31 of file GiveawayWinners.hpp.

◆ chat

Ptr<Chat> tgbotxx::GiveawayWinners::chat

The chat that created the giveaway.

Definition at line 16 of file GiveawayWinners.hpp.

◆ giveawayMessageId

std::int32_t tgbotxx::GiveawayWinners::giveawayMessageId {}

Identifier of the message with the giveaway in the chat.

Definition at line 19 of file GiveawayWinners.hpp.

◆ onlyNewMembers

bool tgbotxx::GiveawayWinners::onlyNewMembers {}

Optional. True, if only users who had joined the chats after the giveaway started were eligible to win.

Definition at line 43 of file GiveawayWinners.hpp.

◆ premiumSubscriptionMonthCount

std::int32_t tgbotxx::GiveawayWinners::premiumSubscriptionMonthCount {}

Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only.

Definition at line 37 of file GiveawayWinners.hpp.

◆ prizeDescription

std::string tgbotxx::GiveawayWinners::prizeDescription {}

Optional. Description of additional giveaway prize.

Definition at line 49 of file GiveawayWinners.hpp.

◆ prizeStarCount

std::int64_t tgbotxx::GiveawayWinners::prizeStarCount {}

Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only.

Definition at line 34 of file GiveawayWinners.hpp.

◆ unclaimedPrizeCount

std::int32_t tgbotxx::GiveawayWinners::unclaimedPrizeCount {}

Optional. Number of undistributed prizes.

Definition at line 40 of file GiveawayWinners.hpp.

◆ wasRefunded

bool tgbotxx::GiveawayWinners::wasRefunded {}

Optional. True, if the giveaway was canceled because the payment for it was refunded.

Definition at line 46 of file GiveawayWinners.hpp.

◆ winnerCount

std::int32_t tgbotxx::GiveawayWinners::winnerCount {}

Total number of winners in the giveaway.

Definition at line 25 of file GiveawayWinners.hpp.

◆ winners

std::vector<Ptr<User> > tgbotxx::GiveawayWinners::winners

List of up to 100 winners of the giveaway.

Definition at line 28 of file GiveawayWinners.hpp.

◆ winnersSelectionDate

std::time_t tgbotxx::GiveawayWinners::winnersSelectionDate {}

Point in time (Unix timestamp) when winners of the giveaway were selected.

Definition at line 22 of file GiveawayWinners.hpp.


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