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>InputStorePaymentPremiumGiveaway_

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

Used to pay for a giveaway, see here » for more info.

Constructors

new
InputStorePaymentPremiumGiveaway_(params: { only_new_subscribers?: true; winners_are_visible?: true; boost_peer: enums.InputPeer; additional_peers?: Array<enums.InputPeer>; countries_iso2?: Array<string>; prize_description?: string; random_id: bigint; until_date: number; currency: string; amount: bigint; })

Properties

protected
readonly
[id]: number
protected
readonly
[params]: Params
optional
additional_peers: Array<enums.InputPeer>

Additional channels that the user must join to participate to the giveaway can be specified here.

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

boost_peer: enums.InputPeer

The channel starting the giveaway, that the user must join to participate, that will receive the giveaway boosts; see here » for more info on giveaways.

optional
countries_iso2: Array<string>

The set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveaway_countries_max countries, specified as two-letter ISO 3166-1 alpha-2 country codes.

currency: string

Three-letter ISO 4217 currency code

optional
only_new_subscribers: true

If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway.

optional
prize_description: string

Can contain a textual description of additional giveaway prizes.

random_id: bigint

Random ID to avoid resending the giveaway

until_date: number

The end date of the giveaway, must be at most giveaway_period_max seconds in the future; see here » for more info on giveaways.

optional
winners_are_visible: true

If set, giveaway winners are public and will be listed in a messageMediaGiveawayResults message that will be automatically sent to the channel once the giveaway ends.

Static Properties

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