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, *, 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:
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

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

See telegram.OwnedGift.de_json().