Skip to content

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

Class: ChatBoostSourceGiveaway

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

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

Parameters

ParameterType
payloadTelegramChatBoostSourceGiveaway

Returns

ChatBoostSourceGiveaway

Overrides

ChatBoostSource.constructor

Properties

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

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

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

MDN

Returns

string

Inherited from

ChatBoostSource.[toStringTag]


giveawayMessageId

Get Signature

get giveawayMessageId(): number

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

Returns

number


prizeStarCount

Get Signature

get prizeStarCount(): number

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

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

Source of the boost, always giveaway

Returns

"giveaway"


user

Get Signature

get user(): User

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

User that boosted the chat

Returns

User

Methods

is()

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

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

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

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

Returns

true