MessageActionGiftCode

class pyrogram.raw.types.MessageActionGiftCode

Contains a Telegram Premium giftcode link.

Constructor of MessageAction.

Details:
  • Layer: 223

  • 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_giveawaytrue (optional)
├── unclaimedtrue (optional)
├── boost_peerPeer (optional)
│ ├── PeerUser
│ │ └── user_idlong
│ ├── PeerChat
│ │ └── chat_idlong
│ └── PeerChannel
│ └── channel_idlong
├── daysint
├── slugstring
├── currencystring (optional)
├── amountlong (optional)
├── crypto_currencystring (optional)
├── crypto_amountlong (optional)
└── messageTextWithEntities (optional)
├── textstring
└── entitiesVector < MessageEntity >
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ ├── lengthint
│ └── languagestring
│ ├── offsetint
│ ├── lengthint
│ └── urlstring
│ ├── offsetint
│ ├── lengthint
│ └── user_idlong
│ ├── offsetint
│ ├── lengthint
│ └── user_idInputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ └── InputUserFromMessage
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ └── lengthint
│ ├── offsetint
│ ├── lengthint
│ └── document_idlong
│ ├── collapsedtrue (optional)
│ ├── offsetint
│ └── lengthint
├── relativetrue (optional)
├── short_timetrue (optional)
├── long_timetrue (optional)
├── short_datetrue (optional)
├── long_datetrue (optional)
├── day_of_weektrue (optional)
├── offsetint
├── lengthint
└── dateint

Example

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