Layer 220
constructor
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;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
OnlyNewSubscribers flags.0?true If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway.
WinnersAreVisible flags.3?true If set, giveaway winners are public and will be listed in a message Media Giveaway Results message that will be automatically sent to the channel once the giveaway ends.
BoostPeer InputPeer 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 Vector<InputPeer> Additional channels that the user must join to participate to the giveaway can be specified here.
CountriesIso2 Vector<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.
PrizeDescription flags.4?string Can contain a textual description of additional giveaway prizes.
RandomId long Random ID to avoid resending the giveaway
UntilDate int The end date of the giveaway, must be at most giveaway_period_max seconds in the future; see here for more info on giveaways.
Currency string Three-letter ISO 4217 currency code
Amount long 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).

Gogram Example

// Creating InputStorePaymentPremiumGiveaway constructor
obj := &tg.InputStorePaymentPremiumGiveaway{
    BoostPeer: &tg.InputPeerUser{UserID: int64(123456789)},
    RandomId: int64(0),
    UntilDate: 0,
    Currency: "...",
    Amount: int64(0),

    // Optional fields:
    // OnlyNewSubscribers: true,
    // WinnersAreVisible: true,
    // AdditionalPeers: []tg.InputPeer{&tg.InputPeerUser{UserID: int64(123456789)}},
    // CountriesIso2: "...",
    // ... more optional fields
}