GramIO API Reference / @gramio/contexts/dist / UniqueGiftInfo
Class: UniqueGiftInfo
Defined in: contexts/index.d.ts:3159
Describes a service message about a unique gift that was sent or received.
Constructors
Constructor
new UniqueGiftInfo(
payload):UniqueGiftInfo
Defined in: contexts/index.d.ts:3161
Parameters
| Parameter | Type |
|---|---|
payload | TelegramUniqueGiftInfo |
Returns
UniqueGiftInfo
Properties
| Property | Type | Defined in |
|---|---|---|
payload | TelegramUniqueGiftInfo | contexts/index.d.ts:3160 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:3163
Returns
string
entities
Get Signature
get entities():
MessageEntity[]
Defined in: contexts/index.d.ts:3175
Special entities that appear in the gift text.
Returns
gift
Get Signature
get gift():
UniqueGift
Defined in: contexts/index.d.ts:3167
Information about the gift
Returns
lastResaleAmount
Get Signature
get lastResaleAmount():
number
Defined in: contexts/index.d.ts:3185
Optional. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins
Returns
number
lastResaleCurrency
Get Signature
get lastResaleCurrency():
TelegramUniqueGiftInfoLastResaleCurrency
Defined in: contexts/index.d.ts:3181
Optional. For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins
Returns
TelegramUniqueGiftInfoLastResaleCurrency
lastResaleStarCount
Get Signature
get lastResaleStarCount():
number
Defined in: contexts/index.d.ts:3189
Optional. For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins
Returns
number
nextTransferDate
Get Signature
get nextTransferDate():
number
Defined in: contexts/index.d.ts:3201
Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now
Returns
number
origin
Get Signature
get origin():
TelegramUniqueGiftInfoOrigin
Defined in: contexts/index.d.ts:3171
Origin of the gift. Currently, either “upgrade” or “transfer”
Returns
ownedGiftId
Get Signature
get ownedGiftId():
string
Defined in: contexts/index.d.ts:3193
Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts
Returns
string
text
Get Signature
get text():
string
Defined in: contexts/index.d.ts:3173
Text of the message that was added to the gift.
Returns
string
transferStarCount
Get Signature
get transferStarCount():
number
Defined in: contexts/index.d.ts:3197
Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift
Returns
number
Methods
isPrivate()
isPrivate():
true
Defined in: contexts/index.d.ts:3177
true, if the sender and gift text are visible only to the receiver.
Returns
true