PremiumGiftCode

class pyrogram.types.PremiumGiftCode

A Telegram Premium gift code was created for the user.

Parameters:
  • creator (:obj:`~pyrogram.types.Chat`, *optional*) – Identifier of a chat or a user that created the gift code.

  • text (:obj:`~pyrogram.types.FormattedText`, *optional*) – Message added to the gift.

  • is_from_giveaway (``bool``, *optional*) – True, if the gift code was created for a giveaway.

  • is_unclaimed (``bool``, *optional*) – True, if the winner for the corresponding Telegram Premium subscription wasn’t chosen.

  • currency (``str``, *optional*) – Currency for the paid amount.

  • amount (``int``, *optional*) – The paid amount, in the smallest units of the currency.

  • cryptocurrency (``str``, *optional*) – Cryptocurrency used to pay for the gift.

  • cryptocurrency_amount (``int``, *optional*) – The paid amount, in the smallest units of the cryptocurrency.

  • month_count (``int``) – Number of months the Telegram Premium subscription will be active after code activation.

  • day_count (``int``) – Number of days the Telegram Premium subscription will be active after code activation.

  • sticker (:obj:`~pyrogram.types.Sticker`, *optional*) – A sticker to be shown in the message.

  • code (``str``) – The gift code.

  • link (``str``, *property*) – Generate a link to this gift code.