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
| Parameter | Type |
|---|---|
payload | TelegramChatBoostSourceGiftCode |
Returns
ChatBoostSourceGiftCode
Overrides
ChatBoostSource.constructor
Properties
| Property | Type | Overrides | Defined in |
|---|---|---|---|
payload | TelegramChatBoostSourceGiftCode | ChatBoostSource.payload | contexts/index.d.ts:3324 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:3317
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
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
| Parameter | Type |
|---|---|
source | T |
Returns
this is ChatBoostSourceMapping[T]
Inherited from
ChatBoostSource.is