GiveawayWinners

@Serializable
data class GiveawayWinners(val chat: Chat, val giveawayMessageId: Long, val winnersSelectionDate: Instant, val winnerCount: Int, val winners: List<User>, val additionalChatCount: Int? = null, val prizeStarCount: Int? = null, val premiumSubscriptionMonthCount: Int? = null, val unclaimedPrizeCount: Int? = null, val onlyNewMembers: Boolean? = null, val wasRefunded: Boolean? = null, val prizeDescription: String? = null)

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

Api reference

Constructors

Link copied to clipboard
constructor(chat: Chat, giveawayMessageId: Long, winnersSelectionDate: Instant, winnerCount: Int, winners: List<User>, additionalChatCount: Int? = null, prizeStarCount: Int? = null, premiumSubscriptionMonthCount: Int? = null, unclaimedPrizeCount: Int? = null, onlyNewMembers: Boolean? = null, wasRefunded: Boolean? = null, prizeDescription: String? = null)

Properties

Link copied to clipboard

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

Link copied to clipboard
val chat: Chat

The chat that created the giveaway

Link copied to clipboard

Identifier of the message with the giveaway in the chat

Link copied to clipboard
val onlyNewMembers: Boolean? = null

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

Link copied to clipboard

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

Link copied to clipboard

Optional. Description of additional giveaway prize

Link copied to clipboard
val prizeStarCount: Int? = null

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

Link copied to clipboard

Optional. Number of undistributed prizes

Link copied to clipboard
val wasRefunded: Boolean? = null

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

Link copied to clipboard

Total number of winners in the giveaway

Link copied to clipboard

List of up to 100 winners of the giveaway

Link copied to clipboard
@Serializable(with = InstantSerializer::class)
val winnersSelectionDate: Instant

Point in time (Unix timestamp) when winners of the giveaway were selected