Link Search Menu Expand Document

Constructor: messageMediaGiveaway

Back to constructors index

Contains info about a giveaway, see here » for more info.

Attributes:

NameTypeRequiredDescription
only_new_subscribersBoolOptionalIf set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway.
winners_are_visibleBoolOptionalIf set, giveaway winners are public and will be listed in a messageMediaGiveawayResults message that will be automatically sent to the channel once the giveaway ends.
channelsArray of longYesThe channels that the user must join to participate in the giveaway.
countries_iso2Array of stringOptionalIf set, only users residing in these countries can participate in the giveaway, (specified as a list of two-letter ISO 3166-1 alpha-2 country codes); otherwise there are no country-based limitations.
prize_descriptionstringOptionalCan contain a textual description of additional giveaway prizes.
quantityintYesNumber of Telegram Premium subscriptions given away.
monthsintOptionalDuration in months of each Telegram Premium subscription in the giveaway.
starslongOptionalFor Telegram Star giveaways, the total number of Telegram Stars being given away.
until_dateintYesThe end date of the giveaway.

Type: MessageMedia

Example:

$messageMediaGiveaway = ['_' => 'messageMediaGiveaway', 'only_new_subscribers' => Bool, 'winners_are_visible' => Bool, 'channels' => [long, long], 'countries_iso2' => ['string', 'string'], 'prize_description' => 'string', 'quantity' => int, 'months' => int, 'stars' => long, 'until_date' => int];