UserGift#

class pyrogram.types.UserGift#

Represents a gift received by a user.

Parameters:
  • sender_user (User, optional) – Identifier of the user that sent the gift; None if unknown.

  • text (str, optional) – Message added to the gift.

  • entities (List of MessageEntity, optional) – For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text.

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

  • is_saved (bool, optional) – True, if the gift is displayed on the user’s profile page; may be False only for the receiver of the gift.

  • date (datetime, optional) – Date when the gift was sent.

  • gift (Gift | UpgradedGift, optional) – Information about the gift.

  • message_id (int, optional) – Identifier of the message with the gift in the chat with the sender of the gift; can be None or an identifier of a deleted message; only for the gift receiver.

  • sell_star_count (int, optional) – Number of Telegram Stars that can be claimed by the receiver instead of the gift; only for the gift receiver.

  • was_converted (bool, optional) – True, if the gift was converted to Telegram Stars; only for the receiver of the gift.

  • can_be_upgraded (bool, optional) – True, if the gift is a regular gift that can be upgraded to a unique gift; only for the receiver of the gift.

  • was_refunded (bool, optional) – True, if the gift was refunded and isn’t available anymore.

  • prepaid_upgrade_star_count (int, optional) – Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.

  • can_be_transferred (bool, optional) – True, if the gift is an upgraded gift that can be transferred to another user; only for the receiver of the gift.

  • transfer_star_count (int, optional) – Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift.

  • export_date (datetime, optional) – Point in time (Unix timestamp) when the upgraded gift can be transferred to TON blockchain as an NFT; None if NFT export isn’t possible; only for the receiver of the gift.