Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mtkruto/tl/2_types.ts>MessageActionGiftCode_

Cross-runtime JavaScript library for building Telegram clients
Go to Latest
class MessageActionGiftCode_
import { MessageActionGiftCode_ } from "https://deno.land/x/mtkruto@0.1.190/tl/2_types.ts";

Constructors

new
MessageActionGiftCode_(params: { via_giveaway?: true; unclaimed?: true; boost_peer?: enums.Peer; months: number; slug: string; currency?: string; amount?: bigint; crypto_currency?: string; crypto_amount?: bigint; })

Properties

protected
readonly
[id]: number
protected
readonly
[params]: Params
optional
amount: bigint

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).

optional
boost_peer: enums.Peer

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.

optional
crypto_amount: bigint

If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency.

optional
crypto_currency: string

If set, the gift was made using the specified cryptocurrency.

optional
currency: string

Three-letter ISO 4217 currency code

months: number

Duration in months of the gifted Telegram Premium subscription.

slug: string
optional
unclaimed: true

If set, the link was not redeemed yet.

optional
via_giveaway: true

If set, this gift code was received from a giveaway » started by a channel we're subscribed to.

Static Properties

readonly
[name]: string
readonly
[paramDesc]: ParamDesc