Skip to content

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

Class: UniqueGiftInfo

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

Describes a service message about a unique gift that was sent or received.

Documentation

Constructors

Constructor

new UniqueGiftInfo(payload): UniqueGiftInfo

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

Parameters

ParameterType
payloadTelegramUniqueGiftInfo

Returns

UniqueGiftInfo

Properties

PropertyTypeDefined in
payloadTelegramUniqueGiftInfocontexts/index.d.ts:2869

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

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

MDN

Returns

string


gift

Get Signature

get gift(): UniqueGift

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

Information about the gift

Returns

UniqueGift


lastResaleAmount

Get Signature

get lastResaleAmount(): number

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

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

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

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

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

Origin of the gift. Currently, either “upgrade” or “transfer”

Returns

TelegramUniqueGiftInfoOrigin


ownedGiftId

Get Signature

get ownedGiftId(): string

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

Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts

Returns

string


transferStarCount

Get Signature

get transferStarCount(): number

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

Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift

Returns

number