Raw.InputStorePaymentPremiumGiveaway
Used to pay for a giveaway, see here for more info.
inputStorePaymentPremiumGiveaway#160544ca flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.3?true boost_peer:InputPeer additional_peers:flags.1?Vector<InputPeer> countries_iso2:flags.2?Vector<string> prize_description:flags.4?string random_id:long until_date:int currency:string amount:long = InputStorePaymentPurpose;
export namespace Raw {
export class InputStorePaymentPremiumGiveaway {
constructor(params: {
onlyNewSubscribers?: boolean;
winnersAreVisible?: boolean;
boostPeer: Raw.TypeInputPeer;
additionalPeers?: Array<Raw.TypeInputPeer>;
countriesIso2?: Array<string>;
prizeDescription?: string;
randomId: bigint;
untilDate: number;
currency: string;
amount: bigint;
}) {}
}
}
This is a types constructor, you can’t use it as method when call invoke.
Layer: 185
Constructor ID: 0x160544ca
Property
onlyNewSubscribers
: boolean or undefinedIf set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway.
winnersAreVisible
: boolean or undefinedIf 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.
boostPeer
: Raw.TypeInputPeerThe channel/supergroup starting the giveaway, that the user must join to participate, that will receive the giveaway boosts; see here for more info on giveaways.
additionalPeers
: Array of Raw.TypeInputPeer or undefinedAdditional channels that the user must join to participate to the giveaway can be specified here.
countriesIso2
: Array of string or undefinedThe set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveawayCountriesMax countries, specified as two-letter iso 3166-1 alpha-2 country codes.
prizeDescription
: string or undefinedCan contain a textual description of additional giveaway prizes.
randomId
: bigintRandom id to avoid resending the giveaway
untilDate
: numberThe end date of the giveaway, must be at most giveawayPeriodMax seconds in the future; see here for more info on giveaways.
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).