GiveawayWinners

class telegram.GiveawayWinners(chat, giveaway_message_id, winners_selection_date, winner_count, winners, additional_chat_count=None, premium_subscription_month_count=None, unclaimed_prize_count=None, only_new_members=None, was_refunded=None, prize_description=None, prize_star_count=None, *, api_kwargs=None)[source]

Bases: telegram.TelegramObject

This object represents a message about the completion of a giveaway with public winners.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their chat, giveaway_message_id, winners_selection_date, winner_count and winners are equal.

Added in version 20.8.

Parameters:
  • chat (telegram.Chat) – The chat that created the giveaway

  • giveaway_message_id (int) – Identifier of the message with the giveaway in the chat

  • winners_selection_date (datetime.datetime) – Point in time when winners of the giveaway were selected. The default timezone of the bot is used for localization, which is UTC unless telegram.ext.Defaults.tzinfo is used.

  • winner_count (int) – Total number of winners in the giveaway

  • winners (Sequence[telegram.User]) – List of up to 100 winners of the giveaway

  • prize_star_count (int, optional) –

    The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only.

    Added in version 21.6.

  • additional_chat_count (int, optional) – The number of other chats the user had to join in order to be eligible for the giveaway

  • premium_subscription_month_count (int, optional) – The number of months the Telegram Premium subscription won from the giveaway will be active for

  • unclaimed_prize_count (int, optional) – Number of undistributed prizes

  • only_new_members (True, optional) – True, if only users who had joined the chats after the giveaway started were eligible to win

  • was_refunded (True, optional) – True, if the giveaway was canceled because the payment for it was refunded

  • prize_description (str, optional) – Description of additional giveaway prize

chat[source]

The chat that created the giveaway

Type:

telegram.Chat

giveaway_message_id[source]

Identifier of the message with the giveaway in the chat

Type:

int

winners_selection_date[source]

Point in time when winners of the giveaway were selected. The default timezone of the bot is used for localization, which is UTC unless telegram.ext.Defaults.tzinfo is used.

Type:

datetime.datetime

winner_count[source]

Total number of winners in the giveaway

Type:

int

winners[source]

tuple of up to 100 winners of the giveaway

Type:

tuple[telegram.User]

additional_chat_count[source]

Optional. The number of other chats the user had to join in order to be eligible for the giveaway

Type:

int

prize_star_count[source]

Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only.

Added in version 21.6.

Type:

int

premium_subscription_month_count[source]

Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for

Type:

int

unclaimed_prize_count[source]

Optional. Number of undistributed prizes

Type:

int

only_new_members[source]

Optional. True, if only users who had joined the chats after the giveaway started were eligible to win

Type:

True

was_refunded[source]

Optional. True, if the giveaway was canceled because the payment for it was refunded

Type:

True

prize_description[source]

Optional. Description of additional giveaway prize

Type:

str

classmethod de_json(data, bot=None)[source]

See telegram.TelegramObject.de_json().