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
andwinners
are equal.Added in version 20.8.
- Parameters:
chat (
telegram.Chat
) – The chat that created the giveawaygiveaway_message_id (
int
) – Identifier of the message with the giveaway in the chatwinners_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 unlesstelegram.ext.Defaults.tzinfo
is used.winner_count (
int
) – Total number of winners in the giveawaywinners (Sequence[
telegram.User
]) – List of up to100
winners of the giveawayprize_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 giveawaypremium_subscription_month_count (
int
, optional) – The number of months the Telegram Premium subscription won from the giveaway will be active forunclaimed_prize_count (
int
, optional) – Number of undistributed prizesonly_new_members (
True
, optional) –True
, if only users who had joined the chats after the giveaway started were eligible to winwas_refunded (
True
, optional) –True
, if the giveaway was canceled because the payment for it was refundedprize_description (
str
, optional) – Description of additional giveaway prize
- 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:
- 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:
- 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:
Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for
- Type:
- only_new_members[source]¶
Optional.
True
, if only users who had joined the chats after the giveaway started were eligible to win- Type:
- was_refunded[source]¶
Optional.
True
, if the giveaway was canceled because the payment for it was refunded- Type: