mirror of
https://github.com/danog/MadelineProtoDocs.git
synced 2024-12-03 10:08:28 +01:00
2.3 KiB
2.3 KiB
title | description | nav_exclude | image |
---|---|---|---|
messageMediaGiveaway | Contains info about a giveaway, see here » for more info. | true | https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png |
Constructor: messageMediaGiveaway
Contains info about a giveaway, see here » for more info.
Attributes:
Name | Type | Required | Description |
---|---|---|---|
only_new_subscribers | Bool | Optional | If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway. |
winners_are_visible | Bool | Optional | If 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. |
channels | Array of long | Yes | The channels that the user must join to participate in the giveaway. |
countries_iso2 | Array of string | Optional | If 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_description | string | Optional | Can contain a textual description of additional giveaway prizes. |
quantity | int | Yes | Number of Telegram Premium subscriptions given away. |
months | int | Yes | Duration in months of each Telegram Premium subscription in the giveaway. |
until_date | int | Yes | The 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, 'until_date' => int];