GramIO API Reference / @gramio/contexts/dist / Gift
Class: Gift
Defined in: contexts/index.d.ts:2357
Describes a service message about a regular gift that was sent or received.
Constructors
Constructor
new Gift(
payload):Gift
Defined in: contexts/index.d.ts:2359
Parameters
| Parameter | Type |
|---|---|
payload | TelegramGift |
Returns
Gift
Properties
| Property | Type | Defined in |
|---|---|---|
payload | TelegramGift | contexts/index.d.ts:2358 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:2361
Returns
string
background
Get Signature
get background():
GiftBackground
Defined in: contexts/index.d.ts:2381
Optional. Background of the gift
Returns
hasColors
Get Signature
get hasColors():
true
Defined in: contexts/index.d.ts:2375
Optional. True, if the gift can be used (after being upgraded) to customize a user's appearance
Returns
true
id
Get Signature
get id():
string
Defined in: contexts/index.d.ts:2385
Information about the gift
Returns
string
isPremium
Get Signature
get isPremium():
true
Defined in: contexts/index.d.ts:2373
Optional. True, if the gift can only be purchased by Telegram Premium subscribers
Returns
true
personalRemainingCount
Get Signature
get personalRemainingCount():
number
Defined in: contexts/index.d.ts:2379
Optional. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only
Returns
number
personalTotalCount
Get Signature
get personalTotalCount():
number
Defined in: contexts/index.d.ts:2377
Optional. The total number of gifts of this type that can be sent by the bot; for limited gifts only
Returns
number
publisherChat
Get Signature
get publisherChat():
Chat
Defined in: contexts/index.d.ts:2387
Optional. Information about the chat that published the gift
Returns
remainingCount
Get Signature
get remainingCount():
number
Defined in: contexts/index.d.ts:2371
The number of remaining gifts of this type that can be sent; for limited gifts only
Returns
number
starCount
Get Signature
get starCount():
number
Defined in: contexts/index.d.ts:2365
The number of Telegram Stars that must be paid to send the sticker
Returns
number
sticker
Get Signature
get sticker():
StickerAttachment
Defined in: contexts/index.d.ts:2363
The sticker that represents the gift
Returns
totalCount
Get Signature
get totalCount():
number
Defined in: contexts/index.d.ts:2369
The total number of the gifts of this type that can be sent; for limited gifts only
Returns
number
uniqueGiftVariantCount
Get Signature
get uniqueGiftVariantCount():
number
Defined in: contexts/index.d.ts:2383
Optional. The total number of different unique gifts that can be obtained by upgrading the gift
Returns
number
upgradeStarCount
Get Signature
get upgradeStarCount():
number
Defined in: contexts/index.d.ts:2367
The number of Telegram Stars that must be paid to upgrade the gift to a unique one
Returns
number