Skip to content

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

Class: UniqueGiftInfo

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

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

Parameters

ParameterType
payloadTelegramUniqueGiftInfo

Returns

UniqueGiftInfo

Properties

PropertyTypeDefined in
payloadTelegramUniqueGiftInfocontexts/index.d.ts:2868

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

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

MDN

Returns

string


gift

Get Signature

get gift(): UniqueGift

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

Information about the gift

Returns

UniqueGift


lastResaleAmount

Get Signature

get lastResaleAmount(): number

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

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

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

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

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

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

Returns

TelegramUniqueGiftInfoOrigin


ownedGiftId

Get Signature

get ownedGiftId(): string

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

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

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

Returns

number