messageActionGiftCode
Contains a Telegram Premium giftcode link.
type tg.MessageActionGiftCode struct { /* ... */ }
Implements MessageAction.
Fields
| Name | Type | Required | Description |
|---|---|---|---|
ViaGiveaway | bool | — | If set, this gift code was received from a giveaway » started by a channel/supergroup we're subscribed to. |
Unclaimed | bool | — | If set, the link was not redeemed yet. |
BoostPeer | PeerClass | — | 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. |
Days | int | yes | Duration of the gifted Telegram Premium subscription, in days. |
Slug | string | yes | Slug of the Telegram Premium giftcode link |
Currency | string | — | Three-letter ISO 4217 currency code |
Amount | int64 | — | 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). |
CryptoCurrency | string | — | If set, the gift was made using the specified cryptocurrency. |
CryptoAmount | int64 | — | If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency. |
Message | TextWithEntities | — | Message attached with the gift |
References
- Official documentation
- Generated Go reference
- TL definition:
messageActionGiftCode#31c48347