MessageMediaGiveawayResults

class pyrogram.raw.types.MessageMediaGiveawayResults

A giveaway with public winners has finished, this constructor contains info about the winners.

Constructor of MessageMedia.

Details:
  • Layer: 223

  • ID: CEAA3EA1

Parameters:
  • channel_id (int 64-bit) – ID of the channel/supergroup that was automatically boosted by the winners of the giveaway for duration of the Premium subscription.

  • launch_msg_id (int 32-bit) – Identifier of the message with the giveaway in channel_id.

  • winners_count (int 32-bit) – Total number of winners in the giveaway.

  • unclaimed_count (int 32-bit) – Number of not-yet-claimed prizes.

  • winners (List of int 64-bit) – Up to 100 user identifiers of the winners of the giveaway.

  • until_date (int 32-bit) – Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in initial parameters of the giveaway.

  • only_new_subscribers (bool, optional) – If set, only new subscribers starting from the giveaway creation date participated in the giveaway.

  • refunded (bool, optional) – If set, the giveaway was canceled and was fully refunded.

  • additional_peers_count (int 32-bit, optional) – Number of other channels that participated in the giveaway.

  • months (int 32-bit, optional) – Duration in months of each Telegram Premium subscription in the giveaway.

  • stars (int 64-bit, optional) – For Telegram Star giveaways, the total number of Telegram Stars being given away.

  • prize_description (str, optional) – Can contain a textual description of additional giveaway prizes.

Functions:

This object can be returned by 2 functions.

messages.UploadMedia

Upload a file and associate it to a chat (without actually sending it to the chat)

messages.UploadImportedMedia

Upload a media file associated with an imported chat, click here for more info ».

TL Schema

messageMediaGiveawayResults#ceaa3ea1
flags:#
only_new_subscribers:flags.0?true
refunded:flags.2?true
channel_id:long
additional_peers_count:flags.3?int
launch_msg_id:int
winners_count:int
unclaimed_count:int
winners:Vector<long>
months:flags.4?int
stars:flags.5?long
prize_description:flags.1?string
until_date:int

= MessageMedia

Parameter Tree

MessageMediaGiveawayResults
├── only_new_subscriberstrue (optional)
├── refundedtrue (optional)
├── channel_idlong
├── additional_peers_countint (optional)
├── launch_msg_idint
├── winners_countint
├── unclaimed_countint
├── winnersVector < long >
├── monthsint (optional)
├── starslong (optional)
├── prize_descriptionstring (optional)
└── until_dateint

Example

MessageMediaGiveawayResults(
    channel_id=0,
    launch_msg_id=0,
    winners_count=0,
    unclaimed_count=0,
    winners=[0],
    until_date=0,
)