Link Search Menu Expand Document

Constructor: savedStarGift

Back to constructors index

Represents a gift owned by a peer.

Attributes:

NameTypeRequiredDescription
name_hiddenBoolOptionalIf set, the gift sender in from_id and the message are set only for the receiver of the gift.
unsavedBoolOptionalIf set, the gift is not pinned on the user’s profile.
refundedBoolOptionalThis 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.
can_upgradeBoolOptionalOnly set for non-collectible gifts, if they can be upgraded to a collectible gift ».
pinned_to_topBoolOptionalWhether this gift is pinned on top of the user’s profile page.
upgrade_separateBoolOptionalIf set, someone already separately pre-paid for the upgrade of this gift.
from_idPeerOptionalSender of the gift (unset for anonymous gifts).
dateintYesReception date of the gift.
giftStarGiftYesThe collectible gift.
messageTextWithEntitiesOptionalMessage attached to the gift.
msg_idintOptionalFor gifts received by users, ID to use in inputSavedStarGiftUser constructors.
saved_idlongOptionalFor gifts received by channels, ID to use in inputSavedStarGiftChat constructors.
convert_starslongOptionalFor non-collectible gifts, the receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.
upgrade_starslongOptionalOnly 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).
can_export_atintOptionalIf 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.
transfer_starslongOptionalIf set, indicates that the gift can be transferred » to another user by paying the specified amount of stars.
can_transfer_atintOptionalIf set, indicates that the current gift can’t be transferred » yet: the owner will be able to transfer it at the specified unixtime.
can_resell_atintOptionalIf 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.
collection_idArray of intOptionalIDs of the collections » that this gift is a part of.
prepaid_upgrade_hashstringOptionalHash to prepay for a gift upgrade separately ».
drop_original_details_starslongOptional

Type: SavedStarGift

Example:

$savedStarGift = ['_' => 'savedStarGift', 'name_hidden' => Bool, 'unsaved' => Bool, 'refunded' => Bool, 'can_upgrade' => Bool, 'pinned_to_top' => Bool, 'upgrade_separate' => Bool, 'from_id' => Peer, 'date' => int, 'gift' => StarGift, 'message' => TextWithEntities, 'msg_id' => int, 'saved_id' => long, 'convert_stars' => long, 'upgrade_stars' => long, 'can_export_at' => int, 'transfer_stars' => long, 'can_transfer_at' => int, 'can_resell_at' => int, 'collection_id' => [int, int], 'prepaid_upgrade_hash' => 'string', 'drop_original_details_stars' => long];