Layer 220
SavedStarGift
Represents a gift owned by a peer.
constructor
savedStarGift#19a9b572 flags:# name_hidden:flags.0?true unsaved:flags.5?true refunded:flags.9?true can_upgrade:flags.10?true pinned_to_top:flags.12?true upgrade_separate:flags.17?true from_id:flags.1?Peer date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int saved_id:flags.11?long convert_stars:flags.4?long upgrade_stars:flags.6?long can_export_at:flags.7?int transfer_stars:flags.8?long can_transfer_at:flags.13?int can_resell_at:flags.14?int collection_id:flags.15?Vector<int> prepaid_upgrade_hash:flags.16?string = SavedStarGift;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| NameHidden | flags.0?true | If set, the gift sender in from_id and the message are set only for the receiver of the gift. |
| Unsaved | flags.5?true | If set, the gift is not pinned on the user's profile. |
| Refunded | flags.9?true | This 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. |
| CanUpgrade | flags.10?true | Only set for non-collectible gifts, if they can be upgraded to a collectible gift. |
| PinnedToTop | flags.12?true | Whether this gift is pinned on top of the user's profile page. |
| UpgradeSeparate | flags.17?true | If set, someone already separately pre-paid for the upgrade of this gift. |
| FromId | flags.1?Peer | Sender of the gift (unset for anonymous gifts). |
| Date | int | Reception date of the gift. |
| Gift | StarGift | The collectible gift. |
| Message | flags.2?TextWithEntities | Message attached to the gift. |
| MsgId | flags.3?int | For gifts received by users, ID to use in input Saved Star Gift User constructors. |
| SavedId | flags.11?long | For gifts received by channels, ID to use in input Saved Star Gift Chat constructors. |
| ConvertStars | flags.4?long | For non-collectible gifts, the receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page. |
| UpgradeStars | flags.6?long | Only 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 message Action Star Gift, where it signals the upgrade price for not yet upgraded gifts). |
| CanExportAt | flags.7?int | If 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. |
| TransferStars | flags.8?long | If set, indicates that the gift can be transferred to another user by paying the specified amount of stars. |
| CanTransferAt | flags.13?int | If set, indicates that the current gift can't be transferred yet: the owner will be able to transfer it at the specified unixtime. |
| CanResellAt | flags.14?int | If 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 | Vector<int> | IDs of the collections that this gift is a part of. |
| PrepaidUpgradeHash | flags.16?string | Hash to prepay for a gift upgrade separately. |
Returns
SavedStarGiftGogram Example
// Creating SavedStarGift constructor obj := &tg.SavedStarGift{ Date: 0, Gift: &tg.StarGift{}, // Optional fields: // NameHidden: true, // Unsaved: true, // Refunded: true, // CanUpgrade: true, // ... more optional fields }