47 nl::json json = nl::json::object();
#define OBJECT_SERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field)
#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 a scheduled giveaway. https://core.telegram....
bool onlyNewMembers
Optional. True, if only users who join the chats after the giveaway started should be eligible to win...
Giveaway(const nl::json &json)
std::vector< Ptr< Chat > > chats
The list of chats which the user must join to participate in the giveaway.
std::time_t winnersSelectionDate
Point in time (Unix timestamp) when winners of the giveaway will be selected.
nl::json toJson() const
Serializes this object to JSON.
std::int32_t winnerCount
The number of users which are supposed to be selected as winners of the giveaway.
std::int32_t premiumSubscriptionMonthCount
Optional. The number of months the Telegram Premium subscription won from the giveaway will be active...
std::string prizeDescription
Optional. Description of additional giveaway prize.
std::vector< std::string > countryCodes
Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which e...
std::int64_t prizeStarCount
Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaw...
bool hasPublicWinners
Optional. True, if the list of giveaway winners will be visible to everyone.
void fromJson(const nl::json &json)
Deserializes this object from JSON.