Layer 227
MessageActionGiftCode
Contains a Telegram Premium giftcode link.
constructor
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;
Parameters
| Name | Type | Description |
|---|---|---|
| ViaGiveaway | flags .0? true | If set, this gift code was received from a giveaway started by a channel/supergroup we're subscribed to. |
| Unclaimed | flags .5? true | If set, the link was not redeemed yet. |
| BoostPeer | flags .1? Peer | 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 | Duration of the gifted Telegram Premium subscription, in days. |
| Slug | string | Slug of the Telegram Premium giftcode link |
| Currency | flags .2? string | Three-letter ISO 4217 currency code |
| Amount | flags .2? long | 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 | flags .3? string | If set, the gift was made using the specified cryptocurrency. |
| CryptoAmount | flags .3? long | If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency. |
| Message | flags .4? TextWithEntities | Message attached with the gift |
Returns
MessageActionGogram Example
// Creating MessageActionGiftCode constructor obj := &tg.MessageActionGiftCode{ ViaGiveaway: nil, Unclaimed: nil, BoostPeer: nil, Days: 42, Slug: "Hello, World!", Currency: "Hello, World!", // ... more required fields }