Skip to content

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

Class: UniqueGift

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

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

Parameters

ParameterType
payloadTelegramUniqueGift

Returns

UniqueGift

Properties

PropertyTypeDefined in
payloadTelegramUniqueGiftcontexts/index.d.ts:2830

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

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

MDN

Returns

string


baseName

Get Signature

get baseName(): string

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

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

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

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

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

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

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

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

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

Optional. Information about the chat that published the gift

Returns

Chat