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

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

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<Giveaway>

Public Attributes

std::vector< std::shared_ptr< Chat > > chats { }
 The list of chats which the user must join to participate in the giveaway.
std::int32_t winnersSelectionDate { }
 Point in time (Unix timestamp) when winners of the giveaway will be selected.
std::uint32_t winnerCount { }
 The number of users which are supposed to be selected as winners of the giveaway.
std::optional< bool > onlyNewMembers { }
 Optional. True, if only users who join the chats after the giveaway started should be eligible to win.
std::optional< bool > hasPublicWinners { }
 Optional. True, if the list of giveaway winners will be visible to everyone.
std::optional< std::string > prizeDescription { }
 Optional. Description of additional giveaway prize.
std::optional< 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.
std::optional< std::uint32_t > prizeStarCount { }
 Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only.
std::optional< std::uint32_t > premiumSubscriptionMonthCount { }
 Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only.

Detailed Description

This object represents a message about a scheduled giveaway.

Definition at line 4065 of file Types.h.

Member Typedef Documentation

◆ Ptr

using TgBot::Giveaway::Ptr = std::shared_ptr<Giveaway>

Definition at line 4066 of file Types.h.

Member Data Documentation

◆ chats

std::vector<std::shared_ptr<Chat> > TgBot::Giveaway::chats { }

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

Definition at line 4071 of file Types.h.

◆ countryCodes

std::optional<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 4099 of file Types.h.

◆ hasPublicWinners

std::optional<bool> TgBot::Giveaway::hasPublicWinners { }

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

Definition at line 4088 of file Types.h.

◆ onlyNewMembers

std::optional<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 4084 of file Types.h.

◆ premiumSubscriptionMonthCount

std::optional<std::uint32_t> TgBot::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 4109 of file Types.h.

◆ prizeDescription

std::optional<std::string> TgBot::Giveaway::prizeDescription { }

Optional. Description of additional giveaway prize.

Definition at line 4092 of file Types.h.

◆ prizeStarCount

std::optional<std::uint32_t> TgBot::Giveaway::prizeStarCount { }

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

Definition at line 4104 of file Types.h.

◆ winnerCount

std::uint32_t TgBot::Giveaway::winnerCount { }

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

Definition at line 4079 of file Types.h.

◆ winnersSelectionDate

std::int32_t TgBot::Giveaway::winnersSelectionDate { }

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

Definition at line 4075 of file Types.h.


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