Gift¶
- class pyrogram.types.Gift¶
Describes a gift or an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.
- Parameters:
id (
int) – Unique identifier of the gift.type (
GiftType) – Type of the gift.origin (
UpgradedGiftOrigin, optional) – Origin of the gift.received_gift_id (
str, optional) – Unique identifier of the received gift for the current user.regular_gift_id (
int, optional) – Unique identifier of the regular gift from which the gift was upgraded.publisher_chat (
Chat, optional) – Information about the chat that published the gift.sticker (
Sticker, optional) – The sticker that represents the gift.text (
FormattedText, optional) – Message added to the gift.date (
datetime, optional) – Date when the gift was sent or received.first_sale_date (
datetime, optional) – Date when the gift was sent for the first time. For sold out gifts only.last_sale_date (
datetime, optional) – Date when the gift was sent for the last time. For sold out gifts only.locked_until_date (
datetime, optional) – Date when the gift will be available for purchase.craft_date (
datetime, optional) – Date when the gift can be used to craft another gift can be in the past.sender (
Chat, optional) – User or a chat that sent the gift.receiver (
Chat, optional) – User or a chat that received the gift.host (
Chat, optional) – User or the chat to which the upgraded gift was assigned from blockchain.owner (
Chat, optional) – User or the chat that owns the gift.owner_address (
str, optional) – Address of the gift owner in TON blockchain.owner_name (
str, optional) – Name of the user who received the star gift.gift_address (
str, optional) – Address of the gift in TON blockchain.title (
str, optional) – The title of the upgraded gift.name (
str, optional) – Unique name of the upgraded gift.model (
GiftAttribute, optional) – Model of the upgraded gift.symbol (
GiftAttribute, optional) – Symbol of the upgraded gift.backdrop (
GiftAttribute, optional) – Backdrop of the upgraded gift.original_details (
UpgradedGiftOriginalDetails, optional) – Information about the originally sent gift.total_upgraded_count (
int, optional) – Total number of gifts that were upgraded from the same gift.max_upgraded_count (
int, optional) – The maximum number of gifts that can be upgraded from the same gift.available_resale_count (
int, optional) – Total number of gifts that can be bought from other users on the market.unique_gift_number (
int, optional) – Unique number of the gift among gifts upgraded from the same gift after upgrade.unique_gift_variant_count (
int, optional) – The total number of different unique gifts that can be obtained by upgrading the gift.star_count (
int, optional) – Number of Telegram Stars that must be paid for the gift.default_sell_star_count (
int, optional) – Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default.convert_star_count (
int, optional) – Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars.upgrade_star_count (
int, optional) – Number of Telegram Stars that must be paid to upgrade the gift.transfer_star_count (
int, optional) – Number of Telegram Stars that must be paid to transfer the upgraded gift.drop_original_details_star_count (
int, optional) – Number of Telegram Stars that must be paid to drop original details of the upgraded gift.minimum_resell_star_count (
int, optional) – Number of Telegram Stars for which sales begin on the market for the gift.minimum_offer_star_count (
int, optional) – Number of Telegram Stars required to make an offer for the gift.prepaid_upgrade_star_count (
int, optional) – Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.prepaid_upgrade_hash (
str, optional) – If non-empty, then the user can pay for an upgrade of the gift usingbuy_gift_upgrade().auction_info (
GiftAuction, optional) – Information about the auction on which the gift can be purchased.resale_parameters (
GiftResaleParameters, optional) – Resale parameters of the gift.user_limits (
GiftPurchaseLimit, optional) – Number of times the gift can be purchased by the current user.overall_limits (
GiftPurchaseLimit, optional) – Number of times the gift can be purchased all users.value_currency (
str, optional) – ISO 4217 currency code of the currency in which value of the gift is represented.value_amount (
int, optional) – Estimated value of the gift; in the smallest units of the currency.value_usd_amount (
int, optional) – Estimated value of the gift in USD cents.last_resale_currency (
str, optional) – For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins.last_resale_amount (
int, optional) – For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins.next_send_date (
datetime, optional) – Date when the gift can be sent next time by the current user.next_transfer_date (
datetime, optional) – Date when the gift can be transferred to another owner.next_resale_date (
datetime, optional) – Date when the gift can be resold to another user.export_date (
datetime, optional) – Date when the gift can be transferred to the TON blockchain as an NFT.collection_ids (List of
int, optional) – Identifiers of collections to which the gift is added. Only for the receiver of the gift.used_theme_chat_id (
int, optional) – Identifier of the chat for which the gift is used to set a theme.craft_probability_per_mille (
int, optional) – Probability that the gift adds to the chance of successful crafting of a new gift.has_colors (
bool, optional) – True, if the gift can be used to customize user’s name and backgrounds.is_auction (
bool, optional) – True, if the gift can be purchased only on an auction.is_private (
bool, optional) – True, if the sender and gift text are shown only to the gift receiver.is_saved (
bool, optional) – True, if the gift is displayed on the chat’s profile page.is_pinned (
bool, optional) – True, if the gift is pinned to the top of the chat’s profile page.is_limited (
bool, optional) – True, if the number of gifts is limited.is_limited_per_user (
bool, optional) – True, if the number of gifts per user is limited.is_sold_out (
bool, optional) – True, if the gift is sold out.is_burned (
bool, optional) – True, if the gift was used to craft another gift.is_crafted (
bool, optional) – True, if the gift was craft from another gifts.is_premium (
bool, optional) – True, if the gift can be bought only by Telegram Premium subscribers.is_for_birthday (
bool, optional) – True, if the gift is a birthday gift.is_theme_available (
bool, optional) – True, if the gift can be used to set a theme in a chat.is_upgrade_separate (
bool, optional) – True, if the upgrade was bought after the gift was sent.is_name_hidden (
bool, optional) – True, if the owner name of the gift is hidden.can_be_upgraded (
bool, optional) – True, if the gift can be upgraded to a unique gift.can_be_transferred (
bool, optional) – True, if the upgraded gift can be transferred to another owner.can_send_purchase_offer (
bool, optional) – True, if an offer to purchase the gift can be sent usingsend_gift_purchase_offer().was_converted (
bool, optional) – True, if the gift was converted to Telegram Stars. Only for the receiver of the gift.was_upgraded (
bool, optional) – True, if the gift was upgraded to a unique gift.was_refunded (
bool, optional) – True, if the gift was refunded and isn’t available anymore.raw (
StarGift|SavedStarGift) – The raw object as received from the server.link (
str, property) – A link to the gift.owned_gift_id (
str, property) – Unique identifier of the gift.