tgbot-cpp
Loading...
Searching...
No Matches
TgBot::Giveaway Class Reference

This object represents a message about a scheduled giveaway. More...

#include <Giveaway.h>

Public Types

typedef std::shared_ptr< GiveawayPtr
 

Public Attributes

std::vector< Chat::Ptrchats
 The list of chats which the user must join to participate in the giveaway.
 
std::uint32_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.
 
std::int32_t premiumSubscriptionMonthCount
 Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for.
 

Detailed Description

This object represents a message about a scheduled giveaway.

Definition at line 18 of file Giveaway.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<Giveaway> TgBot::Giveaway::Ptr

Definition at line 21 of file Giveaway.h.

Member Data Documentation

◆ chats

std::vector<Chat::Ptr> TgBot::Giveaway::chats

The list of chats which the user must join to participate in the giveaway.

Definition at line 26 of file Giveaway.h.

◆ countryCodes

std::vector<std::string> TgBot::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.

Definition at line 59 of file Giveaway.h.

◆ hasPublicWinners

bool TgBot::Giveaway::hasPublicWinners

Optional. True, if the list of giveaway winners will be visible to everyone.

Definition at line 46 of file Giveaway.h.

◆ onlyNewMembers

bool TgBot::Giveaway::onlyNewMembers

Optional. True, if only users who join the chats after the giveaway started should be eligible to win.

Definition at line 41 of file Giveaway.h.

◆ premiumSubscriptionMonthCount

std::int32_t TgBot::Giveaway::premiumSubscriptionMonthCount

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

Definition at line 64 of file Giveaway.h.

◆ prizeDescription

std::string TgBot::Giveaway::prizeDescription

Optional. Description of additional giveaway prize.

Definition at line 51 of file Giveaway.h.

◆ winnerCount

std::int32_t TgBot::Giveaway::winnerCount

The number of users which are supposed to be selected as winners of the giveaway.

Definition at line 36 of file Giveaway.h.

◆ winnersSelectionDate

std::uint32_t TgBot::Giveaway::winnersSelectionDate

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

Definition at line 31 of file Giveaway.h.


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