Skip to content

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

Class: UniqueGift

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

This object describes a unique gift that was upgraded from a regular gift.

Documentation

Constructors

Constructor

new UniqueGift(payload): UniqueGift

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

Parameters

ParameterType
payloadTelegramUniqueGift

Returns

UniqueGift

Properties

PropertyTypeDefined in
payloadTelegramUniqueGiftcontexts/index.d.ts:2831

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

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

MDN

Returns

string


baseName

Get Signature

get baseName(): string

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

Human-readable name of the regular gift from which this unique gift was upgraded

Returns

string


colors

Get Signature

get colors(): UniqueGiftColors

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

Optional. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews

Returns

UniqueGiftColors


giftId

Get Signature

get giftId(): string

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

Identifier of the regular gift from which the gift was upgraded

Returns

string


isBurned

Get Signature

get isBurned(): true

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

Optional. True, if the gift was used to craft another gift and isn't available anymore

Returns

true


isFromBlockchain

Get Signature

get isFromBlockchain(): true

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

Optional. True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram

Returns

true


isPremium

Get Signature

get isPremium(): true

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

Optional. True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers

Returns

true


name

Get Signature

get name(): string

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

Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas

Returns

string


number

Get Signature

get number(): number

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

Unique number of the upgraded gift among gifts upgraded from the same regular gift

Returns

number


publisherChat

Get Signature

get publisherChat(): Chat

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

Optional. Information about the chat that published the gift

Returns

Chat