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, *, 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.

New in version 20.8.

Parameters:
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

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)[source]

See telegram.TelegramObject.de_json.