UniqueGiftInfo¶
- class telegram.UniqueGiftInfo(gift, origin, owned_gift_id=None, transfer_star_count=None, last_resale_star_count=None, next_transfer_date=None, *, api_kwargs=None)[source]¶
Bases:
telegram.TelegramObjectDescribes a service message about a unique gift that was sent or received.
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal if their
gift, andoriginare equal.Available In
Added in version 22.1.
- Parameters:
gift (
UniqueGift) – Information about the gift.origin (
str) –Origin of the gift. Currently, either
UPGRADEfor gifts upgraded from regular gifts,TRANSFERfor gifts transferred from other users or channels, orRESALEfor gifts bought from other users.Changed in version 22.3: The
RESALEorigin was added.owned_gift_id (
str, optional) – bot; only present for gifts received on behalf of business accounts.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.last_resale_star_count (
int, optional) –For gifts bought from other users, the price paid for the gift.
Added in version 22.3.
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.tzinfois used.Added in version 22.3.
- origin[source]¶
Origin of the gift. Currently, either
UPGRADEfor gifts upgraded from regular gifts,TRANSFERfor gifts transferred from other users or channels, orRESALEfor gifts bought from other users.Changed in version 22.3: The
RESALEorigin was added.- Type:
str
- owned_gift_id[source]¶
bot; only present for gifts received on behalf of business accounts.
- Type:
str
- 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
- last_resale_star_count[source]¶
Optional. For gifts bought from other users, the price paid for the gift.
Added in version 22.3.
- 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.tzinfois used.Added in version 22.3.
- Type:
datetime.datetime
- RESALE = 'resale'[source]¶
telegram.constants.UniqueGiftInfoOrigin.RESALEAdded in version 22.3.