Skip to content

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

Class: GiftInfo ​

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

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

Documentation

Constructors ​

Constructor ​

new GiftInfo(payload): GiftInfo

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

Parameters ​

ParameterType
payloadTelegramGiftInfo

Returns ​

GiftInfo

Properties ​

PropertyTypeDefined in
payloadTelegramGiftInfocontexts/index.d.ts:2396

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

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

MDN

Returns ​

string


canBeUpgraded ​

Get Signature ​

get canBeUpgraded(): true

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

True, if the gift can be upgraded to a unique gift

Returns ​

true


convertStarCount ​

Get Signature ​

get convertStarCount(): number

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

Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible

Returns ​

number


entities ​

Get Signature ​

get entities(): MessageEntity[]

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

Special entities that appear in the text

Returns ​

MessageEntity[]


gift ​

Get Signature ​

get gift(): Gift

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

Information about the gift

Returns ​

Gift


isPrivate ​

Get Signature ​

get isPrivate(): true

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

True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them

Returns ​

true


isUpgradeSeparate ​

Get Signature ​

get isUpgradeSeparate(): true

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

Optional. True, if the gift's upgrade was purchased after the gift was sent

Returns ​

true


ownedGiftId ​

Get Signature ​

get ownedGiftId(): string

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

Identifier of the received gift for the bot; only present for gifts received on behalf of business accounts

Returns ​

string


prepaidUpgradeStarCount ​

Get Signature ​

get prepaidUpgradeStarCount(): number

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

Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift

Returns ​

number


text ​

Get Signature ​

get text(): string

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

Text of the message that was added to the gift

Returns ​

string


uniqueGiftNumber ​

Get Signature ​

get uniqueGiftNumber(): number

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

Optional. Unique number reserved for this gift when upgraded

Returns ​

number