MessageActionGiftCode

class pyrogram.raw.types.MessageActionGiftCode

Contains a Telegram Premium giftcode link.

Constructor of MessageAction.

Details:
  • Layer: 227

  • ID: 31C48347

Parameters:
  • days (int 32-bit)

  • slug (str) – Slug of the Telegram Premium giftcode link

  • via_giveaway (bool, optional) – If set, this gift code was received from a giveaway » started by a channel/supergroup we’re subscribed to.

  • unclaimed (bool, optional) – If set, the link was not redeemed yet.

  • boost_peer (Peer, optional) – Identifier of the channel/supergroup that created the gift code either directly or through a giveaway: if we import this giftcode link, we will also automatically boost this channel/supergroup.

  • currency (str, optional) – Three-letter ISO 4217 currency code

  • amount (int 64-bit, optional) – Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).

  • crypto_currency (str, optional) – If set, the gift was made using the specified cryptocurrency.

  • crypto_amount (int 64-bit, optional) – If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency.

  • message (TextWithEntities, optional) – Message attached with the gift

TL Schema

messageActionGiftCode#31c48347
flags:#
via_giveaway:flags.0?true
unclaimed:flags.5?true
boost_peer:flags.1?Peer
days:int
slug:string
currency:flags.2?string
amount:flags.2?long
crypto_currency:flags.3?string
crypto_amount:flags.3?long
message:flags.4?TextWithEntities

= MessageAction

Parameter Tree

MessageActionGiftCode
├── via_giveaway → true (optional)
├── unclaimed → true (optional)
├── boost_peer → Peer (optional)
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
├── days → int
├── slug → string
├── currency → string (optional)
├── amount → long (optional)
├── crypto_currency → string (optional)
├── crypto_amount → long (optional)
└── message → TextWithEntities (optional)
├── text → string
└── entities → Vector < MessageEntity >
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ ├── length → int
│ └── language → string
│ ├── offset → int
│ ├── length → int
│ └── url → string
│ ├── offset → int
│ ├── length → int
│ └── user_id → long
│ ├── offset → int
│ ├── length → int
│ └── user_id → InputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ └── InputUserFromMessage
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ ├── length → int
│ └── document_id → long
│ ├── collapsed → true (optional)
│ ├── offset → int
│ └── length → int
│ ├── relative → true (optional)
│ ├── short_time → true (optional)
│ ├── long_time → true (optional)
│ ├── short_date → true (optional)
│ ├── long_date → true (optional)
│ ├── day_of_week → true (optional)
│ ├── offset → int
│ ├── length → int
│ └── date → int
│ ├── offset → int
│ └── length → int
│ ├── offset → int
│ ├── length → int
│ └── old_text → string
├── offset → int
└── length → int

Example

MessageActionGiftCode(
    days=0,
    slug="text",
)