Raw.PremiumGiftCodeOption
Contains info about a giveaway/gift option.
premiumGiftCodeOption#257e962b flags:# users:int months:int store_product:flags.0?string store_quantity:flags.1?int currency:string amount:long = PremiumGiftCodeOption;
export namespace Raw {
export class PremiumGiftCodeOption {
constructor(params: {
users: number;
months: number;
storeProduct?: string;
storeQuantity?: number;
currency: string;
amount: bigint;
}) {}
}
}
🚫
This is a types constructor, you can’t use it as method when call invoke.
Layer: 185
Constructor ID: 0x257e962b
Property
users
: numberNumber of users which will be able to activate the gift codes.
months
: numberDuration in months of each gifted telegram premium subscription.
storeProduct
: string or undefinedIdentifier of the store product associated with the option, official apps only.
storeQuantity
: number or undefinedNumber of times the store product must be paid
currency
: stringThree-letter iso 4217 currency code
amount
: bigintTotal 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).