Skip to main content

savedStarGift

Represents a gift owned by a peer.

type tg.SavedStarGift struct { /* ... */ }

Fields

NameTypeRequiredDescription
NameHiddenboolIf set, the gift sender in from_id and the message are set only for the receiver of the gift.
UnsavedboolIf set, the gift is not pinned on the user's profile.
RefundedboolThis gift was upgraded to a collectible gift » and then re-downgraded to a regular gift because a request to refund the payment related to the upgrade was made, and the money was returned.
CanUpgradeboolOnly set for non-collectible gifts, if they can be upgraded to a collectible gift ».
PinnedToTopboolWhether this gift is pinned on top of the user's profile page.
UpgradeSeparateboolIf set, someone already separately pre-paid for the upgrade of this gift.
FromIDPeerClassSender of the gift (unset for anonymous gifts).
DateintyesReception date of the gift.
GiftStarGiftClassyesThe collectible gift.
MessageTextWithEntitiesMessage attached to the gift.
MsgIDintFor gifts received by users, ID to use in inputSavedStarGiftUser constructors.
SavedIDint64For gifts received by channels, ID to use in inputSavedStarGiftChat constructors.
ConvertStarsint64For non-collectible gifts, the receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.
UpgradeStarsint64Only for pre-paid non-collectible gifts, the number of Telegram Stars the sender has already paid to convert the gift into a collectible gift » (this is different from the meaning of the flag in messageActionStarGift, where it signals the upgrade price for not yet upgraded gifts).
CanExportAtintIf set, indicates that the current gift can't be exported to the TON blockchain » yet: the owner will be able to export it at the specified unixtime.
TransferStarsint64If set, indicates that the gift can be transferred » to another user by paying the specified amount of stars.
CanTransferAtintIf set, indicates that the current gift can't be transferred » yet: the owner will be able to transfer it at the specified unixtime.
CanResellAtintIf set, indicates that the current gift can't be resold » yet: the owner will be able to put it up for sale at the specified unixtime.
CollectionID[]intIDs of the collections » that this gift is a part of.
PrepaidUpgradeHashstringHash to prepay for a gift upgrade separately ».
DropOriginalDetailsStarsint64If set, the starGiftAttributeOriginalDetails attribute of this gift may be removed by paying the specified amount of stars, see here » for the full flow.
GiftNumintCollectible number assigned to the gift, if already known.
CanCraftAtintIf set, this gift can be used for crafting » only starting from the specified unixtime.

References