Skip to content
Back to top
View this page

# UniqueGift

class telegram.UniqueGift(gift_id, base_name, name, number, model, symbol, backdrop, publisher_chat=None, is_from_blockchain=None, is_premium=None, colors=None, is_burned=None, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object describes a unique gift that was upgraded from a regular gift.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal if their `base_name`, `name`, `number`, `model`, `symbol`, and `backdrop` are equal.

  Available In

  - `telegram.OwnedGiftUnique.gift`

  - `telegram.UniqueGiftInfo.gift`

  Added in version 22.1.

  Changed in version 22.7: `gift_id` is now a positional argument.

  Parameters:

    - gift_id (`str`) –

      Identifier of the regular gift from which the gift was upgraded.

      Added in version 22.6.

    - base_name (`str`) – Human-readable name of the regular gift from which this unique gift was upgraded.

    - name (`str`) – Unique name of the gift. This name can be used in `https://t.me/nft/...` links and story areas.

    - number (`int`) – Unique number of the upgraded gift among gifts upgraded from the same regular gift.

    - model (`UniqueGiftModel`) – Model of the gift.

    - symbol (`UniqueGiftSymbol`) – Symbol of the gift.

    - backdrop (`UniqueGiftBackdrop`) – Backdrop of the gift.

    - publisher_chat (`telegram.Chat`, optional) –

      Information about the chat that published the gift.

      Added in version 22.4.

    - is_premium (`bool`, optional) –

      `True`, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers.

      Added in version 22.6.

    - is_from_blockchain (`bool`, optional) –

      `True`, if the gift is assigned from the TON blockchain and can’t be resold or transferred in Telegram.

      Added in version 22.6.

    - colors (`telegram.UniqueGiftColors`, optional) –

      The color scheme that can be used by the gift’s owner for the chat’s name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only.

      Added in version 22.6.

    - is_burned (`bool`, optional) –

      `True`, if the gift was used to craft another gift and isn’t available anymore.

      Added in version 22.7.

  gift_id

    Identifier of the regular gift from which the gift was upgraded.

    Added in version 22.6.

    Type:

      `str`

  base_name

    Human-readable name of the regular gift from which this unique gift was upgraded.

    Type:

      `str`

  name

    Unique name of the gift. This name can be used in `https://t.me/nft/...` links and story areas.

    Type:

      `str`

  number

    Unique number of the upgraded gift among gifts upgraded from the same regular gift.

    Type:

      `int`

  model

    Model of the gift.

    Type:

      `telegram.UniqueGiftModel`

  symbol

    Symbol of the gift.

    Type:

      `telegram.UniqueGiftSymbol`

  backdrop

    Backdrop of the gift.

    Type:

      `telegram.UniqueGiftBackdrop`

  publisher_chat

    Optional. Information about the chat that published the gift.

    Added in version 22.4.

    Type:

      `telegram.Chat`

  is_premium

    Optional. `True`, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers.

    Added in version 22.6.

    Type:

      `bool`

  is_from_blockchain

    Optional. `True`, if the gift is assigned from the TON blockchain and can’t be resold or transferred in Telegram.

    Added in version 22.6.

    Type:

      `bool`

  colors

    Optional. The color scheme that can be used by the gift’s owner for the chat’s name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only.

    Added in version 22.6.

    Type:

      `telegram.UniqueGiftColors`

  is_burned

    Optional. `True`, if the gift was used to craft another gift and isn’t available anymore.

    Added in version 22.7.

    Type:

      `bool`

  classmethod de_json(data, bot=None)

    See `telegram.TelegramObject.de_json()`.