peyk.platforms.telegram.types.gift_info

Classes

GiftInfo([gift, owned_gift_id, ...])

Describes a service message about a regular gift that was sent or received.

class peyk.platforms.telegram.types.gift_info.GiftInfo(gift: Gift | None = None, owned_gift_id: str | None = None, convert_star_count: int | None = None, upgrade_star_count: int | None = None, can_be_upgraded: bool | None = None, is_saved: bool | None = None, is_pinned: bool | None = None, is_private: bool | None = None, is_saved_in_chat: bool | None = None, can_be_refunded: bool | None = None, upgraded_gift: object | None = None, date: int | None = None, send_date: int | None = None, last_reservation_date: int | None = None)[source]

Bases: object

Describes a service message about a regular gift that was sent or received.

Variables:
  • gift (peyk.platforms.telegram.types.gift.Gift | None) – Information about the gift

  • owned_gift_id (str | None) – Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts

  • convert_star_count (int | None) – Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible

  • prepaid_upgrade_star_count – Number of Telegram Stars that were prepaid for the ability to upgrade the gift

  • is_upgrade_separate – True, if the gift’s upgrade was purchased after the gift was sent

  • can_be_upgraded (bool | None) – True, if the gift can be upgraded to a unique gift

  • text – Text of the message that was added to the gift

  • entities – Special entities that appear in the text

  • is_private (bool | None) – True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them

  • unique_gift_number – Unique number reserved for this gift when upgraded. See the number field in UniqueGift.

gift: Gift | None = None
owned_gift_id: str | None = None
convert_star_count: int | None = None
upgrade_star_count: int | None = None
can_be_upgraded: bool | None = None
is_saved: bool | None = None
is_pinned: bool | None = None
is_private: bool | None = None
is_saved_in_chat: bool | None = None
can_be_refunded: bool | None = None
upgraded_gift: object | None = None
date: int | None = None
send_date: int | None = None
last_reservation_date: int | None = None
classmethod from_dict(data: dict | None) GiftInfo | None[source]

Provides the from dict operation for the Telegram integration.

Parameters:

data – Value used by this operation.

Returns:

Result produced by the operation.