MessageMediaGiveaway
- class pyrogram.raw.types.MessageMediaGiveaway
Contains info about a giveaway, see here » for more info.
Constructor of
MessageMedia.- Details:
Layer:
223ID:
AA073BEB
- Parameters:
channels (List of
int64-bit) – The channels that the user must join to participate in the giveaway.quantity (
int32-bit) – Number of Telegram Premium subscriptions given away.until_date (
int32-bit) – The end date of the giveaway.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.countries_iso2 (List of
str, 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 (
str, optional) – Can contain a textual description of additional giveaway prizes.months (
int32-bit, optional) – Duration in months of each Telegram Premium subscription in the giveaway.stars (
int64-bit, optional) – For Telegram Star giveaways, the total number of Telegram Stars being given away.
- Functions:
This object can be returned by 2 functions.
Upload a file and associate it to a chat (without actually sending it to the chat)
Upload a media file associated with an imported chat, click here for more info ».
TL Schema
messageMediaGiveaway#aa073beb
flags:#
only_new_subscribers:flags.0?true
winners_are_visible:flags.2?true
channels:Vector<long>
countries_iso2:flags.1?Vector<string>
prize_description:flags.3?string
quantity:int
months:flags.4?int
stars:flags.5?long
until_date:int
= MessageMedia
Parameter Tree
true (optional)true (optional)Vector < long >Vector < string > (optional)string (optional)intint (optional)long (optional)intExample
MessageMediaGiveaway(
channels=[0],
quantity=0,
until_date=0,
)