Skip to content

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

Class: ChatBoostSourceGiftCode

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

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

Parameters

ParameterType
payloadTelegramChatBoostSourceGiftCode

Returns

ChatBoostSourceGiftCode

Overrides

ChatBoostSource.constructor

Properties

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

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

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

MDN

Returns

string

Inherited from

ChatBoostSource.[toStringTag]


source

Get Signature

get source(): "gift_code"

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

Source of the boost, always gift_code

Returns

"gift_code"


user

Get Signature

get user(): User

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

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