SavedStarGift

class pyrogram.raw.types.SavedStarGift

Represents a gift owned by a peer.

Constructor of SavedStarGift.

Details:
  • Layer: 223

  • ID: 41DF43FC

Parameters:
  • date (int 32-bit) – Reception date of the gift.

  • gift (StarGift) – The collectible gift.

  • name_hidden (bool, optional) – If set, the gift sender in from_id and the message are set only for the receiver of the gift.

  • unsaved (bool, optional) – If set, the gift is not pinned on the user’s profile.

  • refunded (bool, optional) – 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.

  • can_upgrade (bool, optional) – Only set for non-collectible gifts, if they can be upgraded to a collectible gift ».

  • pinned_to_top (bool, optional) – Whether this gift is pinned on top of the user’s profile page.

  • upgrade_separate (bool, optional) – If set, someone already separately pre-paid for the upgrade of this gift.

  • from_id (Peer, optional) – Sender of the gift (unset for anonymous gifts).

  • message (TextWithEntities, optional) – Message attached to the gift.

  • msg_id (int 32-bit, optional) – For gifts received by users, ID to use in inputSavedStarGiftUser constructors.

  • saved_id (int 64-bit, optional) – For gifts received by channels, ID to use in inputSavedStarGiftChat constructors.

  • convert_stars (int 64-bit, optional) – 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.

  • upgrade_stars (int 64-bit, optional) – 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 messageActionStarGift, where it signals the upgrade price for not yet upgraded gifts).

  • can_export_at (int 32-bit, optional) – 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.

  • transfer_stars (int 64-bit, optional) – If set, indicates that the gift can be transferred » to another user by paying the specified amount of stars.

  • can_transfer_at (int 32-bit, optional) – If 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_at (int 32-bit, optional) – 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.

  • collection_id (List of int 32-bit, optional) – IDs of the collections » that this gift is a part of.

  • prepaid_upgrade_hash (str, optional) – Hash to prepay for a gift upgrade separately ».

  • drop_original_details_stars (int 64-bit, optional)

  • gift_num (int 32-bit, optional)

  • can_craft_at (int 32-bit, optional)

TL Schema

savedStarGift#41df43fc
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
drop_original_details_stars:flags.18?long
gift_num:flags.19?int
can_craft_at:flags.20?int

= SavedStarGift

Parameter Tree

SavedStarGift
├── name_hiddentrue (optional)
├── unsavedtrue (optional)
├── refundedtrue (optional)
├── can_upgradetrue (optional)
├── pinned_to_toptrue (optional)
├── upgrade_separatetrue (optional)
├── from_idPeer (optional)
│ ├── PeerUser
│ │ └── user_idlong
│ ├── PeerChat
│ │ └── chat_idlong
│ └── PeerChannel
│ └── channel_idlong
├── dateint
├── giftStarGift
│ ├── StarGift
│ │ ├── limitedtrue (optional)
│ │ ├── sold_outtrue (optional)
│ │ ├── birthdaytrue (optional)
│ │ ├── require_premiumtrue (optional)
│ │ ├── limited_per_usertrue (optional)
│ │ ├── peer_color_availabletrue (optional)
│ │ ├── auctiontrue (optional)
│ │ ├── idlong
│ │ ├── stickerDocument
│ │ │ ├── DocumentEmpty
│ │ │ │ └── idlong
│ │ │ └── Document
│ │ │ ├── idlong
│ │ │ ├── access_hashlong
│ │ │ ├── file_referencebytes
│ │ │ ├── dateint
│ │ │ ├── mime_typestring
│ │ │ ├── sizelong
│ │ │ ├── thumbsVector < PhotoSize > (optional)
│ │ │ │ ├── PhotoSizeEmpty
│ │ │ │ ├── PhotoSize
│ │ │ │ ├── PhotoCachedSize
│ │ │ │ ├── PhotoStrippedSize
│ │ │ │ ├── PhotoSizeProgressive
│ │ │ │ └── PhotoPathSize
│ │ │ ├── video_thumbsVector < VideoSize > (optional)
│ │ │ │ ├── VideoSize
│ │ │ │ ├── VideoSizeEmojiMarkup
│ │ │ │ └── VideoSizeStickerMarkup
│ │ │ ├── dc_idint
│ │ │ └── attributesVector < DocumentAttribute >
│ │ │ ├── DocumentAttributeImageSize
│ │ │ ├── DocumentAttributeAnimated
│ │ │ ├── DocumentAttributeSticker
│ │ │ ├── DocumentAttributeVideo
│ │ │ ├── DocumentAttributeAudio
│ │ │ ├── DocumentAttributeFilename
│ │ │ ├── DocumentAttributeHasStickers
│ │ │ └── DocumentAttributeCustomEmoji
│ │ ├── starslong
│ │ ├── availability_remainsint (optional)
│ │ ├── availability_totalint (optional)
│ │ ├── availability_resalelong (optional)
│ │ ├── convert_starslong
│ │ ├── first_sale_dateint (optional)
│ │ ├── last_sale_dateint (optional)
│ │ ├── upgrade_starslong (optional)
│ │ ├── resell_min_starslong (optional)
│ │ ├── titlestring (optional)
│ │ ├── released_byPeer (optional)
│ │ │ ├── PeerUser
│ │ │ │ └── user_idlong
│ │ │ ├── PeerChat
│ │ │ │ └── chat_idlong
│ │ │ └── PeerChannel
│ │ │ └── channel_idlong
│ │ ├── per_user_totalint (optional)
│ │ ├── per_user_remainsint (optional)
│ │ ├── locked_until_dateint (optional)
│ │ ├── auction_slugstring (optional)
│ │ ├── gifts_per_roundint (optional)
│ │ ├── auction_start_dateint (optional)
│ │ ├── upgrade_variantsint (optional)
│ │ └── backgroundStarGiftBackground (optional)
│ │ └── StarGiftBackground
│ │ ├── center_colorint
│ │ ├── edge_colorint
│ │ └── text_colorint
│ └── StarGiftUnique
│ ├── require_premiumtrue (optional)
│ ├── resale_ton_onlytrue (optional)
│ ├── theme_availabletrue (optional)
│ ├── burnedtrue (optional)
│ ├── craftedtrue (optional)
│ ├── idlong
│ ├── gift_idlong
│ ├── titlestring
│ ├── slugstring
│ ├── numint
│ ├── owner_idPeer (optional)
│ │ ├── PeerUser
│ │ │ └── user_idlong
│ │ ├── PeerChat
│ │ │ └── chat_idlong
│ │ └── PeerChannel
│ │ └── channel_idlong
│ ├── owner_namestring (optional)
│ ├── owner_addressstring (optional)
│ ├── attributesVector < StarGiftAttribute >
│ │ ├── StarGiftAttributeModel
│ │ │ ├── craftedtrue (optional)
│ │ │ ├── namestring
│ │ │ ├── documentDocument
│ │ │ │ ├── DocumentEmpty
│ │ │ │ └── Document
│ │ │ └── rarityStarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarityUncommon
│ │ │ ├── StarGiftAttributeRarityRare
│ │ │ ├── StarGiftAttributeRarityEpic
│ │ │ └── StarGiftAttributeRarityLegendary
│ │ ├── StarGiftAttributePattern
│ │ │ ├── namestring
│ │ │ ├── documentDocument
│ │ │ │ ├── DocumentEmpty
│ │ │ │ └── Document
│ │ │ └── rarityStarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarityUncommon
│ │ │ ├── StarGiftAttributeRarityRare
│ │ │ ├── StarGiftAttributeRarityEpic
│ │ │ └── StarGiftAttributeRarityLegendary
│ │ ├── StarGiftAttributeBackdrop
│ │ │ ├── namestring
│ │ │ ├── backdrop_idint
│ │ │ ├── center_colorint
│ │ │ ├── edge_colorint
│ │ │ ├── pattern_colorint
│ │ │ ├── text_colorint
│ │ │ └── rarityStarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarity
│ │ │ ├── StarGiftAttributeRarityUncommon
│ │ │ ├── StarGiftAttributeRarityRare
│ │ │ ├── StarGiftAttributeRarityEpic
│ │ │ └── StarGiftAttributeRarityLegendary
│ │ ├── sender_idPeer (optional)
│ │ │ ├── PeerUser
│ │ │ ├── PeerChat
│ │ │ └── PeerChannel
│ │ ├── recipient_idPeer
│ │ │ ├── PeerUser
│ │ │ ├── PeerChat
│ │ │ └── PeerChannel
│ │ ├── dateint
│ │ └── messageTextWithEntities (optional)
│ │ └── TextWithEntities
│ ├── availability_issuedint
│ ├── availability_totalint
│ ├── gift_addressstring (optional)
│ ├── resell_amountVector < StarsAmount > (optional)
│ │ ├── StarsAmount
│ │ │ ├── amountlong
│ │ │ └── nanosint
│ │ └── StarsTonAmount
│ │ └── amountlong
│ ├── released_byPeer (optional)
│ │ ├── PeerUser
│ │ │ └── user_idlong
│ │ ├── PeerChat
│ │ │ └── chat_idlong
│ │ └── PeerChannel
│ │ └── channel_idlong
│ ├── value_amountlong (optional)
│ ├── value_currencystring (optional)
│ ├── value_usd_amountlong (optional)
│ ├── theme_peerPeer (optional)
│ │ ├── PeerUser
│ │ │ └── user_idlong
│ │ ├── PeerChat
│ │ │ └── chat_idlong
│ │ └── PeerChannel
│ │ └── channel_idlong
│ ├── peer_colorPeerColor (optional)
│ │ ├── PeerColor
│ │ │ ├── colorint (optional)
│ │ │ └── background_emoji_idlong (optional)
│ │ ├── PeerColorCollectible
│ │ │ ├── collectible_idlong
│ │ │ ├── gift_emoji_idlong
│ │ │ ├── background_emoji_idlong
│ │ │ ├── accent_colorint
│ │ │ ├── colorsVector < int >
│ │ │ ├── dark_accent_colorint (optional)
│ │ │ └── dark_colorsVector < int > (optional)
│ │ └── InputPeerColorCollectible
│ │ └── collectible_idlong
│ ├── host_idPeer (optional)
│ │ ├── PeerUser
│ │ │ └── user_idlong
│ │ ├── PeerChat
│ │ │ └── chat_idlong
│ │ └── PeerChannel
│ │ └── channel_idlong
│ ├── offer_min_starsint (optional)
│ └── craft_chance_permilleint (optional)
├── messageTextWithEntities (optional)
│ └── TextWithEntities
│ ├── textstring
│ └── entitiesVector < MessageEntity >
│ ├── MessageEntityUnknown
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityMention
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityHashtag
│ │ ├── offsetint
│ │ └── lengthint
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityUrl
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityEmail
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityBold
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityItalic
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityCode
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityPre
│ │ ├── offsetint
│ │ ├── lengthint
│ │ └── languagestring
│ ├── MessageEntityTextUrl
│ │ ├── offsetint
│ │ ├── lengthint
│ │ └── urlstring
│ │ ├── offsetint
│ │ ├── lengthint
│ │ └── user_idlong
│ │ ├── offsetint
│ │ ├── lengthint
│ │ └── user_idInputUser
│ │ ├── InputUserEmpty
│ │ ├── InputUserSelf
│ │ ├── InputUser
│ │ └── InputUserFromMessage
│ ├── MessageEntityPhone
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityCashtag
│ │ ├── offsetint
│ │ └── lengthint
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityStrike
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntityBankCard
│ │ ├── offsetint
│ │ └── lengthint
│ ├── MessageEntitySpoiler
│ │ ├── offsetint
│ │ └── lengthint
│ │ ├── offsetint
│ │ ├── lengthint
│ │ └── document_idlong
│ │ ├── collapsedtrue (optional)
│ │ ├── offsetint
│ │ └── lengthint
│ ├── relativetrue (optional)
│ ├── short_timetrue (optional)
│ ├── long_timetrue (optional)
│ ├── short_datetrue (optional)
│ ├── long_datetrue (optional)
│ ├── day_of_weektrue (optional)
│ ├── offsetint
│ ├── lengthint
│ └── dateint
├── msg_idint (optional)
├── saved_idlong (optional)
├── convert_starslong (optional)
├── upgrade_starslong (optional)
├── can_export_atint (optional)
├── transfer_starslong (optional)
├── can_transfer_atint (optional)
├── can_resell_atint (optional)
├── collection_idVector < int > (optional)
├── prepaid_upgrade_hashstring (optional)
├── drop_original_details_starslong (optional)
├── gift_numint (optional)
└── can_craft_atint (optional)

Example

SavedStarGift(
    date=0,
    gift=StarGift(
        id=0,
        sticker=DocumentEmpty(id=0),
        stars=0,
        convert_stars=0
    ),
)