55 nl::json json = nl::json::object();
#define OBJECT_SERIALIZE_FIELD_PTR(json, json_field, field)
#define OBJECT_SERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field)
#define OBJECT_DESERIALIZE_FIELD_PTR(json, json_field, field, optional)
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
#define OBJECT_DESERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field, optional)
This object represents a message about the completion of a giveaway with public winners....
std::int32_t unclaimedPrizeCount
Optional. Number of undistributed prizes.
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::string prizeDescription
Optional. Description of additional giveaway prize.
Ptr< Chat > chat
The chat that created the giveaway.
GiveawayWinners()=default
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 gi...
std::int32_t premiumSubscriptionMonthCount
Optional. The number of months the Telegram Premium subscription won from the giveaway will be active...
std::time_t winnersSelectionDate
Point in time (Unix timestamp) when winners of the giveaway were selected.
bool onlyNewMembers
Optional. True, if only users who had joined the chats after the giveaway started were eligible to wi...
std::int32_t giveawayMessageId
Identifier of the message with the giveaway in the chat.
nl::json toJson() const
Serializes this object to JSON.
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.
bool wasRefunded
Optional. True, if the giveaway was canceled because the payment for it was refunded.
GiveawayWinners(const nl::json &json)