Link Search Menu Expand Document

Constructor: messageActionGiftCode

Back to constructors index

Contains a Telegram Premium giftcode link.

Attributes:

NameTypeRequiredDescription
via_giveawayBoolOptionalIf set, this gift code was received from a giveaway » started by a channel we’re subscribed to.
unclaimedBoolOptionalIf set, the link was not redeemed yet.
boost_peerPeerOptionalIdentifier 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.
monthsintYesDuration in months of the gifted Telegram Premium subscription.
slugstringYesSlug of the Telegram Premium giftcode link
currencystringOptionalThree-letter ISO 4217 currency code
amountlongOptionalTotal 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_currencystringOptionalIf set, the gift was made using the specified cryptocurrency.
crypto_amountlongOptionalIf crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency.

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];