Constructor: messageActionGiftCode
Contains a Telegram Premium giftcode link.
Attributes:
Name | Type | Required | Description |
---|---|---|---|
via_giveaway | Bool | Optional | If set, this gift code was received from a giveaway » started by a channel we’re subscribed to. |
unclaimed | Bool | Optional | If set, the link was not redeemed yet. |
boost_peer | Peer | Optional | Identifier of the channel that created the gift code either directly or through a giveaway: if we import this giftcode link, we will also automatically boost this channel. |
months | int | Yes | Duration in months of the gifted Telegram Premium subscription. |
slug | string | Yes | Slug of the Telegram Premium giftcode link |
currency | string | Optional | Three-letter ISO 4217 currency code |
amount | long | 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 | string | Optional | If set, the gift was made using the specified cryptocurrency. |
crypto_amount | long | Optional | If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency. |
message | TextWithEntities | Optional |
Type: MessageAction
Example:
$messageActionGiftCode = ['_' => 'messageActionGiftCode', 'via_giveaway' => Bool, 'unclaimed' => Bool, 'boost_peer' => Peer, 'months' => int, 'slug' => 'string', 'currency' => 'string', 'amount' => long, 'crypto_currency' => 'string', 'crypto_amount' => long, 'message' => TextWithEntities];