GramIO API Reference / @gramio/contexts/dist / Gift
Class: Gift
Defined in: contexts/index.d.ts:2563
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:2565
Parameters
| Parameter | Type |
|---|---|
payload | TelegramGift |
Returns
Gift
Properties
| Property | Type | Defined in |
|---|---|---|
payload | TelegramGift | contexts/index.d.ts:2564 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:2567
Returns
string
background
Get Signature
get background():
GiftBackground
Defined in: contexts/index.d.ts:2587
Optional. Background of the gift
Returns
hasColors
Get Signature
get hasColors():
true
Defined in: contexts/index.d.ts:2581
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:2591
Information about the gift
Returns
string
isPremium
Get Signature
get isPremium():
true
Defined in: contexts/index.d.ts:2579
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:2585
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:2583
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:2593
Optional. Information about the chat that published the gift
Returns
remainingCount
Get Signature
get remainingCount():
number
Defined in: contexts/index.d.ts:2577
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:2571
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:2569
The sticker that represents the gift
Returns
totalCount
Get Signature
get totalCount():
number
Defined in: contexts/index.d.ts:2575
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:2589
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:2573
The number of Telegram Stars that must be paid to upgrade the gift to a unique one
Returns
number