Skip to content

GramIO API Reference / @gramio/contexts/dist / GiveawayWinners

Class: GiveawayWinners

Defined in: contexts/index.d.ts:1600

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

Constructors

Constructor

new GiveawayWinners(payload): GiveawayWinners

Defined in: contexts/index.d.ts:1602

Parameters

ParameterType
payloadTelegramGiveawayWinners

Returns

GiveawayWinners

Properties

PropertyTypeDefined in
payloadTelegramGiveawayWinnerscontexts/index.d.ts:1601

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

Defined in: contexts/index.d.ts:1604

MDN

Returns

string


additionalChatCount

Get Signature

get additionalChatCount(): number

Defined in: contexts/index.d.ts:1616

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

Returns

number


chat

Get Signature

get chat(): Chat

Defined in: contexts/index.d.ts:1606

The chat that created the giveaway

Returns

Chat


messageId

Get Signature

get messageId(): number

Defined in: contexts/index.d.ts:1608

Identifier of the message with the giveaway in the chat

Returns

number


onlyNewMembers

Get Signature

get onlyNewMembers(): true

Defined in: contexts/index.d.ts:1622

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

Returns

true


premiumSubscriptionMonthCount

Get Signature

get premiumSubscriptionMonthCount(): number

Defined in: contexts/index.d.ts:1618

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

Returns

number


prizeDescription

Get Signature

get prizeDescription(): string

Defined in: contexts/index.d.ts:1626

Description of additional giveaway prize

Returns

string


prizeStarCount

Get Signature

get prizeStarCount(): number

Defined in: contexts/index.d.ts:1628

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

Returns

number


unclaimedPrizeCount

Get Signature

get unclaimedPrizeCount(): number

Defined in: contexts/index.d.ts:1620

Number of undistributed prizes

Returns

number


winnerCount

Get Signature

get winnerCount(): number

Defined in: contexts/index.d.ts:1612

Total number of winners in the giveaway

Returns

number


winners

Get Signature

get winners(): User[]

Defined in: contexts/index.d.ts:1614

List of up to 100 winners of the giveaway

Returns

User[]


winnersSelectionDate

Get Signature

get winnersSelectionDate(): number

Defined in: contexts/index.d.ts:1610

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

Returns

number

Methods

wasRefunded()

wasRefunded(): true

Defined in: contexts/index.d.ts:1624

true, if the giveaway was canceled because the payment for it was refunded

Returns

true