Link Search Menu Expand Document

Constructor: starsGiveawayOption

Back to constructors index

Contains info about a Telegram Star giveaway option.

Attributes:

NameTypeRequiredDescription
extendedBoolOptionalIf set, this option must only be shown in the full list of giveaway options (i.e. they must be added to the list only when the user clicks on the expand button).
defaultBoolOptionalIf set, this option must be pre-selected by default in the option list.
starslongYesThe number of Telegram Stars that will be distributed among winners
yearly_boostsintYesNumber of times the chat will be boosted for one year if the inputStorePaymentStarsGiveaway.boost_peer flag is populated
store_productstringOptionalIdentifier of the store product associated with the option, official apps only.
currencystringYesThree-letter ISO 4217 currency code
amountlongYesTotal price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
winnersArray of StarsGiveawayWinnersOptionYesAllowed options for the number of giveaway winners.

Type: StarsGiveawayOption

Example:

$starsGiveawayOption = ['_' => 'starsGiveawayOption', 'extended' => Bool, 'default' => Bool, 'stars' => long, 'yearly_boosts' => int, 'store_product' => 'string', 'currency' => 'string', 'amount' => long, 'winners' => [StarsGiveawayWinnersOption, StarsGiveawayWinnersOption]];