Skip to content

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

Class: ChatBoostSourceGiftCode ​

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

The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.

Extends ​

  • ChatBoostSource

Constructors ​

Constructor ​

new ChatBoostSourceGiftCode(payload): ChatBoostSourceGiftCode

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

Parameters ​

ParameterType
payloadTelegramChatBoostSourceGiftCode

Returns ​

ChatBoostSourceGiftCode

Overrides ​

ChatBoostSource.constructor

Properties ​

PropertyTypeOverridesDefined in
payloadTelegramChatBoostSourceGiftCodeChatBoostSource.payloadcontexts/index.d.ts:3767

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

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

MDN

Returns ​

string

Inherited from ​

ChatBoostSource.[toStringTag]


source ​

Get Signature ​

get source(): "gift_code"

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

Source of the boost, always gift_code

Returns ​

"gift_code"


user ​

Get Signature ​

get user(): User

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

User for which the gift code was created

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