|
tgbotxx 1.1.9.2
Telegram Bot C++ Library
|
This object represents a message about a scheduled giveaway. https://core.telegram.org/bots/api#giveaway. More...
#include <Giveaway.hpp>
Public Member Functions | |
| Giveaway ()=default | |
| Giveaway (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::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. | |
| std::int32_t | winnerCount {} |
| The number of users which are supposed to be selected as winners of the giveaway. | |
| bool | onlyNewMembers {} |
| Optional. True, if only users who join the chats after the giveaway started should be eligible to win. | |
| bool | hasPublicWinners {} |
| Optional. True, if the list of giveaway winners will be visible to everyone. | |
| 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 eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways. 3166-1 alpha-2: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 . | |
| std::int64_t | prizeStarCount {} |
| Optional. The number of Telegram Stars to be 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. | |
This object represents a message about a scheduled giveaway. https://core.telegram.org/bots/api#giveaway.
Definition at line 8 of file Giveaway.hpp.
|
default |
|
inlineexplicit |
Definition at line 10 of file Giveaway.hpp.
|
inline |
Deserializes this object from JSON.
Definition at line 61 of file Giveaway.hpp.
|
inline |
Serializes this object to JSON.
Definition at line 46 of file Giveaway.hpp.
The list of chats which the user must join to participate in the giveaway.
Definition at line 15 of file Giveaway.hpp.
| std::vector<std::string> tgbotxx::Giveaway::countryCodes |
Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways. 3166-1 alpha-2: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 .
Definition at line 36 of file Giveaway.hpp.
| bool tgbotxx::Giveaway::hasPublicWinners {} |
Optional. True, if the list of giveaway winners will be visible to everyone.
Definition at line 27 of file Giveaway.hpp.
| bool tgbotxx::Giveaway::onlyNewMembers {} |
Optional. True, if only users who join the chats after the giveaway started should be eligible to win.
Definition at line 24 of file Giveaway.hpp.
| std::int32_t tgbotxx::Giveaway::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 42 of file Giveaway.hpp.
| std::string tgbotxx::Giveaway::prizeDescription |
Optional. Description of additional giveaway prize.
Definition at line 30 of file Giveaway.hpp.
| std::int64_t tgbotxx::Giveaway::prizeStarCount {} |
Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only.
Definition at line 39 of file Giveaway.hpp.
| std::int32_t tgbotxx::Giveaway::winnerCount {} |
The number of users which are supposed to be selected as winners of the giveaway.
Definition at line 21 of file Giveaway.hpp.
| std::time_t tgbotxx::Giveaway::winnersSelectionDate {} |
Point in time (Unix timestamp) when winners of the giveaway will be selected.
Definition at line 18 of file Giveaway.hpp.