OwnedGiftUnique

class telegram.OwnedGiftUnique(gift, send_date, owned_gift_id=None, sender_user=None, is_saved=None, can_be_transferred=None, transfer_star_count=None, next_transfer_date=None, *, api_kwargs=None)[source]

Bases: telegram.OwnedGift

Describes a unique gift received and owned by a user or a chat.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their gift and send_date are equal.

Added in version 22.1.

Parameters:
  • gift (telegram.UniqueGift) – Information about the unique gift.

  • owned_gift_id (str, optional) – Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only.

  • sender_user (telegram.User, optional) – Sender of the gift if it is a known user.

  • send_date (datetime.datetime) – Date the gift was sent as datetime.datetime. The default timezone of the bot is used for localization, which is UTC unless telegram.ext.Defaults.tzinfo is used.

  • is_saved (bool, optional) – True, if the gift is displayed on the account’s profile page; for gifts received on behalf of business accounts only.

  • can_be_transferred (bool, optional) – True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only.

  • transfer_star_count (int, optional) – Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift.

  • next_transfer_date (datetime.datetime, optional) – Date when the gift can be transferred. If it’s in the past, then the gift can be transferred now. The default timezone of the bot is used for localization, which is UTC unless telegram.ext.Defaults.tzinfo is used. .. versionadded:: 22.3

type[source]

Type of the owned gift, always 'unique'.

Type:

str

gift[source]

Information about the unique gift.

Type:

telegram.UniqueGift

owned_gift_id[source]

Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only.

Type:

str

sender_user[source]

Optional. Sender of the gift if it is a known user.

Type:

telegram.User

send_date[source]

Date the gift was sent as datetime.datetime. The default timezone of the bot is used for localization, which is UTC unless telegram.ext.Defaults.tzinfo is used.

Type:

datetime.datetime

is_saved[source]

Optional. True, if the gift is displayed on the account’s profile page; for gifts received on behalf of business accounts only.

Type:

bool

can_be_transferred[source]

Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only.

Type:

bool

transfer_star_count[source]

Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift.

Type:

int

next_transfer_date[source]

Optional. Date when the gift can be transferred. If it’s in the past, then the gift can be transferred now. The default timezone of the bot is used for localization, which is UTC unless telegram.ext.Defaults.tzinfo is used. .. versionadded:: 22.3

Type:

datetime.datetime

classmethod de_json(data, bot=None)[source]

See telegram.OwnedGift.de_json().