List of all members | Public Fields | Public Instance Methods | Static Public Attributes
giveawayParameters Class Referencefinal

Inherits Object.

Description

Describes parameters of a giveaway.

Public Fields

int53 boosted_chat_id_
 Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Telegram Premium subscription, or for the specified time. If the chat is a channel, then can_post_messages right is required in the channel, otherwise, the user must be an administrator in the supergroup.
 
array< int53additional_chat_ids_
 Identifiers of other supergroup or channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats.
 
int32 winners_selection_date_
 Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption("giveaway_duration_max") seconds in the future in scheduled giveaways.
 
bool only_new_members_
 True, if only new members of the chats will be eligible for the giveaway.
 
bool has_public_winners_
 True, if the list of winners of the giveaway will be available to everyone.
 
array< stringcountry_codes_
 The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway. There can be up to getOption("giveaway_country_count_max") chosen countries. Users with phone number that was bought at https://fragment.com can participate in any giveaway and the country code "FT" must not be specified in the list.
 
string prize_description_
 Additional description of the giveaway prize; 0-128 characters.
 

Public Instance Methods

 giveawayParameters ()
 
 giveawayParameters (int53 boosted_chat_id_, array< int53 > &&additional_chat_ids_, int32 winners_selection_date_, bool only_new_members_, bool has_public_winners_, array< string > &&country_codes_, string const &prize_description_)
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Instance Methods inherited from TlObject
virtual void store (TlStorerUnsafe &s) const
 
virtual void store (TlStorerCalcLength &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
TlObjectoperator= (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
TlObjectoperator= (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Static Public Attributes

static const std::int32_t ID = 1171549354
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ giveawayParameters() [1/2]

Describes parameters of a giveaway.

◆ giveawayParameters() [2/2]

giveawayParameters ( int53  boosted_chat_id_,
array< int53 > &&  additional_chat_ids_,
int32  winners_selection_date_,
bool  only_new_members_,
bool  has_public_winners_,
array< string > &&  country_codes_,
string const &  prize_description_ 
)

Describes parameters of a giveaway.

Parameters
[in]boosted_chat_id_Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Telegram Premium subscription, or for the specified time. If the chat is a channel, then can_post_messages right is required in the channel, otherwise, the user must be an administrator in the supergroup.
[in]additional_chat_ids_Identifiers of other supergroup or channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats.
[in]winners_selection_date_Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption("giveaway_duration_max") seconds in the future in scheduled giveaways.
[in]only_new_members_True, if only new members of the chats will be eligible for the giveaway.
[in]has_public_winners_True, if the list of winners of the giveaway will be available to everyone.
[in]country_codes_The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway. There can be up to getOption("giveaway_country_count_max") chosen countries. Users with phone number that was bought at https://fragment.com can participate in any giveaway and the country code "FT" must not be specified in the list.
[in]prize_description_Additional description of the giveaway prize; 0-128 characters.

Method Documentation

◆ store()

void store ( TlStorerToString &  s,
const char *  field_name 
) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


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