StarGiftUnique

class pyrogram.raw.types.StarGiftUnique

Represents a collectible star gift, see here » for more info.

Constructor of StarGift.

Details:
  • Layer: 227

  • ID: 85F0A9CD

Parameters:
  • id (int 64-bit) – Identifier of the collectible gift.

  • gift_id (int 64-bit) – Unique ID of the gift.

  • title (str) – Collectible title.

  • slug (str) – Slug that can be used to create a collectible gift deep link », or elsewhere in the API where a collectible slug is accepted.

  • num (int 32-bit) – Unique identifier of this collectible gift among all (already upgraded) collectible gifts of the same type.

  • attributes (List of StarGiftAttribute) – Collectible attributes

  • availability_issued (int 32-bit) – Total number of gifts of the same type that were upgraded to a collectible gift.

  • availability_total (int 32-bit) – Total number of gifts of the same type that can be upgraded or were already upgraded to a collectible gift.

  • require_premium (bool, optional) – This gift can only be bought by users with a Premium subscription.

  • resale_ton_only (bool, optional) – Whether the gift can be bought only using Toncoins.

  • theme_available (bool, optional) – A chat theme associated to this gift is available, see here » for more info on how to use it.

  • burned (bool, optional)

  • crafted (bool, optional)

  • owner_id (Peer, optional) – The owner of the gift.

  • owner_name (str, optional) – The name of the owner if neither owner_id nor owner_address are set.

  • owner_address (str, optional) – For NFTs on the TON blockchain, contains the address of the owner (append it to the ton_blockchain_explorer_url client configuration value » to obtain a link with information about the address).

  • gift_address (str, optional) – For NFTs on the TON blockchain, contains the address of the NFT (append it to the ton_blockchain_explorer_url client configuration value » to obtain a link with information about the address).

  • resell_amount (List of StarsAmount, optional) – Resale price of the gift.

  • released_by (Peer, optional) – This gift was released by the specified peer.

  • value_amount (int 64-bit, optional) – Price of the gift.

  • value_currency (str, optional) – Currency for the gift’s price.

  • value_usd_amount (int 64-bit, optional)

  • theme_peer (Peer, optional) – The current chat where the associated chat theme is installed, if any (gift-based themes can only be installed in one chat at a time).

  • peer_color (PeerColor, optional)

  • host_id (Peer, optional)

  • offer_min_stars (int 32-bit, optional)

  • craft_chance_permille (int 32-bit, optional)

TL Schema

starGiftUnique#85f0a9cd
flags:#
require_premium:flags.6?true
resale_ton_only:flags.7?true
theme_available:flags.9?true
burned:flags.14?true
crafted:flags.15?true
id:long
gift_id:long
title:string
slug:string
num:int
owner_id:flags.0?Peer
owner_name:flags.1?string
owner_address:flags.2?string
attributes:Vector<StarGiftAttribute>
availability_issued:int
availability_total:int
gift_address:flags.3?string
resell_amount:flags.4?Vector<StarsAmount>
released_by:flags.5?Peer
value_amount:flags.8?long
value_currency:flags.8?string
value_usd_amount:flags.8?long
theme_peer:flags.10?Peer
peer_color:flags.11?PeerColor
host_id:flags.12?Peer
offer_min_stars:flags.13?int
craft_chance_permille:flags.16?int

= StarGift

Parameter Tree

StarGiftUnique
├── require_premium → true (optional)
├── resale_ton_only → true (optional)
├── theme_available → true (optional)
├── burned → true (optional)
├── crafted → true (optional)
├── id → long
├── gift_id → long
├── title → string
├── slug → string
├── num → int
├── owner_id → Peer (optional)
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
├── owner_name → string (optional)
├── owner_address → string (optional)
├── attributes → Vector < StarGiftAttribute >
│ │ ├── crafted → true (optional)
│ │ ├── name → string
│ │ ├── document → Document
│ │ │ ├── DocumentEmpty
│ │ │ │ └── id → long
│ │ │ └── Document
│ │ │ ├── id → long
│ │ │ ├── access_hash → long
│ │ │ ├── file_reference → bytes
│ │ │ ├── date → int
│ │ │ ├── mime_type → string
│ │ │ ├── size → long
│ │ │ ├── thumbs → Vector < PhotoSize > (optional)
│ │ │ │ ├── PhotoSizeEmpty
│ │ │ │ ├── PhotoSize
│ │ │ │ ├── PhotoCachedSize
│ │ │ │ ├── PhotoStrippedSize
│ │ │ │ ├── PhotoSizeProgressive
│ │ │ │ └── PhotoPathSize
│ │ │ ├── video_thumbs → Vector < VideoSize > (optional)
│ │ │ │ ├── VideoSize
│ │ │ │ ├── VideoSizeEmojiMarkup
│ │ │ │ └── VideoSizeStickerMarkup
│ │ │ ├── dc_id → int
│ │ │ └── attributes → Vector < DocumentAttribute >
│ │ │ ├── DocumentAttributeImageSize
│ │ │ ├── DocumentAttributeAnimated
│ │ │ ├── DocumentAttributeSticker
│ │ │ ├── DocumentAttributeVideo
│ │ │ ├── DocumentAttributeAudio
│ │ │ ├── DocumentAttributeFilename
│ │ │ ├── DocumentAttributeHasStickers
│ │ │ └── DocumentAttributeCustomEmoji
│ │ └── rarity → StarGiftAttributeRarity
│ │ ├── StarGiftAttributeRarity
│ │ │ └── permille → int
│ │ ├── StarGiftAttributeRarityRare
│ │ ├── StarGiftAttributeRarityEpic
│ │ ├── name → string
│ │ ├── document → Document
│ │ │ ├── DocumentEmpty
│ │ │ │ └── id → long
│ │ │ └── Document
│ │ │ ├── id → long
│ │ │ ├── access_hash → long
│ │ │ ├── file_reference → bytes
│ │ │ ├── date → int
│ │ │ ├── mime_type → string
│ │ │ ├── size → long
│ │ │ ├── thumbs → Vector < PhotoSize > (optional)
│ │ │ │ ├── PhotoSizeEmpty
│ │ │ │ ├── PhotoSize
│ │ │ │ ├── PhotoCachedSize
│ │ │ │ ├── PhotoStrippedSize
│ │ │ │ ├── PhotoSizeProgressive
│ │ │ │ └── PhotoPathSize
│ │ │ ├── video_thumbs → Vector < VideoSize > (optional)
│ │ │ │ ├── VideoSize
│ │ │ │ ├── VideoSizeEmojiMarkup
│ │ │ │ └── VideoSizeStickerMarkup
│ │ │ ├── dc_id → int
│ │ │ └── attributes → Vector < DocumentAttribute >
│ │ │ ├── DocumentAttributeImageSize
│ │ │ ├── DocumentAttributeAnimated
│ │ │ ├── DocumentAttributeSticker
│ │ │ ├── DocumentAttributeVideo
│ │ │ ├── DocumentAttributeAudio
│ │ │ ├── DocumentAttributeFilename
│ │ │ ├── DocumentAttributeHasStickers
│ │ │ └── DocumentAttributeCustomEmoji
│ │ └── rarity → StarGiftAttributeRarity
│ │ ├── StarGiftAttributeRarity
│ │ │ └── permille → int
│ │ ├── StarGiftAttributeRarityRare
│ │ ├── StarGiftAttributeRarityEpic
│ │ ├── name → string
│ │ ├── backdrop_id → int
│ │ ├── center_color → int
│ │ ├── edge_color → int
│ │ ├── pattern_color → int
│ │ ├── text_color → int
│ │ └── rarity → StarGiftAttributeRarity
│ │ ├── StarGiftAttributeRarity
│ │ │ └── permille → int
│ │ ├── StarGiftAttributeRarityRare
│ │ ├── StarGiftAttributeRarityEpic
│ ├── sender_id → Peer (optional)
│ │ ├── PeerUser
│ │ │ └── user_id → long
│ │ ├── PeerChat
│ │ │ └── chat_id → long
│ │ └── PeerChannel
│ │ └── channel_id → long
│ ├── recipient_id → Peer
│ │ ├── PeerUser
│ │ │ └── user_id → long
│ │ ├── PeerChat
│ │ │ └── chat_id → long
│ │ └── PeerChannel
│ │ └── channel_id → long
│ ├── date → int
│ └── message → TextWithEntities (optional)
│ └── TextWithEntities
│ ├── text → string
│ └── entities → Vector < MessageEntity >
│ ├── MessageEntityUnknown
│ ├── MessageEntityMention
│ ├── MessageEntityHashtag
│ ├── MessageEntityUrl
│ ├── MessageEntityEmail
│ ├── MessageEntityBold
│ ├── MessageEntityItalic
│ ├── MessageEntityCode
│ ├── MessageEntityPre
│ ├── MessageEntityTextUrl
│ ├── MessageEntityPhone
│ ├── MessageEntityCashtag
│ ├── MessageEntityStrike
│ ├── MessageEntityBankCard
│ ├── MessageEntitySpoiler
├── availability_issued → int
├── availability_total → int
├── gift_address → string (optional)
├── resell_amount → Vector < StarsAmount > (optional)
│ ├── StarsAmount
│ │ ├── amount → long
│ │ └── nanos → int
│ └── StarsTonAmount
│ └── amount → long
├── released_by → Peer (optional)
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
├── value_amount → long (optional)
├── value_currency → string (optional)
├── value_usd_amount → long (optional)
├── theme_peer → Peer (optional)
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
├── peer_color → PeerColor (optional)
│ ├── PeerColor
│ │ ├── color → int (optional)
│ │ └── background_emoji_id → long (optional)
│ ├── PeerColorCollectible
│ │ ├── collectible_id → long
│ │ ├── gift_emoji_id → long
│ │ ├── background_emoji_id → long
│ │ ├── accent_color → int
│ │ ├── colors → Vector < int >
│ │ ├── dark_accent_color → int (optional)
│ │ └── dark_colors → Vector < int > (optional)
│ └── collectible_id → long
├── host_id → Peer (optional)
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
├── offer_min_stars → int (optional)
└── craft_chance_permille → int (optional)

Example

StarGiftUnique(
    id=0,
    gift_id=0,
    title="text",
    slug="text",
    num=0,
    attributes=[
            StarGiftAttributeModel(
                name="text",
                document=DocumentEmpty(id=0),
                rarity=StarGiftAttributeRarity(permille=0)
            )
        ],
    availability_issued=0,
    availability_total=0,
)