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
andsend_date
are equal.Available In
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 asdatetime.datetime
. The default timezone of the bot is used for localization, which is UTC unlesstelegram.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.
- owned_gift_id[source]¶
Optional. Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only.
- Type:
- send_date[source]¶
Date the gift was sent as
datetime.datetime
. The default timezone of the bot is used for localization, which is UTC unlesstelegram.ext.Defaults.tzinfo
is used..- Type:
- 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:
- 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:
- 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: