GramIO API Reference / @gramio/contexts/dist / GiftInfo
Class: GiftInfo
Defined in: contexts/index.d.ts:2601
Describes a service message about a regular gift that was sent or received.
Constructors
Constructor
new GiftInfo(
payload):GiftInfo
Defined in: contexts/index.d.ts:2603
Parameters
| Parameter | Type |
|---|---|
payload | TelegramGiftInfo |
Returns
GiftInfo
Properties
| Property | Type | Defined in |
|---|---|---|
payload | TelegramGiftInfo | contexts/index.d.ts:2602 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:2605
Returns
string
canBeUpgraded
Get Signature
get canBeUpgraded():
true
Defined in: contexts/index.d.ts:2615
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:2611
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:2619
Special entities that appear in the text
Returns
gift
Get Signature
get gift():
Gift
Defined in: contexts/index.d.ts:2607
Information about the gift
Returns
isPrivate
Get Signature
get isPrivate():
true
Defined in: contexts/index.d.ts:2621
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:2623
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:2609
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:2613
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:2617
Text of the message that was added to the gift
Returns
string
uniqueGiftNumber
Get Signature
get uniqueGiftNumber():
number
Defined in: contexts/index.d.ts:2625
Optional. Unique number reserved for this gift when upgraded
Returns
number