Skip to content

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

Class: GiveawayWinners

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

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

Parameters

ParameterType
payloadTelegramGiveawayWinners

Returns

GiveawayWinners

Properties

PropertyTypeDefined in
payloadTelegramGiveawayWinnerscontexts/index.d.ts:1967

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

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

MDN

Returns

string


additionalChatCount

Get Signature

get additionalChatCount(): number

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

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

The chat that created the giveaway

Returns

Chat


messageId

Get Signature

get messageId(): number

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

Identifier of the message with the giveaway in the chat

Returns

number


onlyNewMembers

Get Signature

get onlyNewMembers(): true

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

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

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

Description of additional giveaway prize

Returns

string


prizeStarCount

Get Signature

get prizeStarCount(): number

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

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

Number of undistributed prizes

Returns

number


winnerCount

Get Signature

get winnerCount(): number

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

Total number of winners in the giveaway

Returns

number


winners

Get Signature

get winners(): User[]

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

List of up to 100 winners of the giveaway

Returns

User[]


winnersSelectionDate

Get Signature

get winnersSelectionDate(): number

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

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

Returns

number

Methods

wasRefunded()

wasRefunded(): true

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

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

Returns

true