Raw.InputStorePaymentPremiumGiveaway

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 undefined

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

  • winnersAreVisible : boolean or undefined

    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.

  • boostPeer : Raw.TypeInputPeer

    The 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 undefined

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

  • countriesIso2 : Array of string or undefined

    The 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 undefined

    Can contain a textual description of additional giveaway prizes.

  • randomId : bigint

    Random id to avoid resending the giveaway

  • untilDate : number

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

  • currency : string

    Three-letter iso 4217 currency code

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