Skip to content

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

Class: ChatBoostSourceGiveaway ​

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

The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.

Extends ​

  • ChatBoostSource

Constructors ​

Constructor ​

new ChatBoostSourceGiveaway(payload): ChatBoostSourceGiveaway

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

Parameters ​

ParameterType
payloadTelegramChatBoostSourceGiveaway

Returns ​

ChatBoostSourceGiveaway

Overrides ​

ChatBoostSource.constructor

Properties ​

PropertyTypeOverridesDefined in
payloadTelegramChatBoostSourceGiveawayChatBoostSource.payloadcontexts/index.d.ts:3728

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

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

MDN

Returns ​

string

Inherited from ​

ChatBoostSource.[toStringTag]


giveawayMessageId ​

Get Signature ​

get giveawayMessageId(): number

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

Returns ​

number


prizeStarCount ​

Get Signature ​

get prizeStarCount(): number

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

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

Returns ​

number


source ​

Get Signature ​

get source(): "giveaway"

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

Source of the boost, always giveaway

Returns ​

"giveaway"


user ​

Get Signature ​

get user(): User

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

User that boosted the chat

Returns ​

User

Methods ​

is() ​

is<T>(source): this is ChatBoostSourceMapping[T]

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

Is this chat boost source a certain one?

Type Parameters ​

Type Parameter
T extends "giveaway" | "premium" | "gift_code"

Parameters ​

ParameterType
sourceT

Returns ​

this is ChatBoostSourceMapping[T]

Inherited from ​

ChatBoostSource.is


isUnclaimed() ​

isUnclaimed(): true

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

true, if the giveaway was completed, but there was no user to win the prize

Returns ​

true