Raw.InputStorePaymentPremiumGiftCode

Raw.InputStorePaymentPremiumGiftCode

Used to gift telegram premium subscriptions only to some specific subscribers of a channel/supergroup or to some of our contacts, see here for more info on giveaways and gifts.

inputStorePaymentPremiumGiftCode#a3805f3f flags:# users:Vector<InputUser> boost_peer:flags.0?InputPeer currency:string amount:long = InputStorePaymentPurpose;
export namespace Raw {
  export class InputStorePaymentPremiumGiftCode {
    constructor(params: {
      users: Array<Raw.TypeInputUser>;
      boostPeer?: Raw.TypeInputPeer;
      currency: string;
      amount: bigint;
    }) {}
  }
}
🚫

This is a types constructor, you can’t use it as method when call invoke.

Layer: 185
Constructor ID: 0xa3805f3f

Property

  • users : Array of Raw.TypeInputUser

    The users that will receive the telegram premium subscriptions.

  • boostPeer : Raw.TypeInputPeer or undefined

    If set, the gifts will be sent on behalf of a channel/supergroup we are an admin of, which will also assign some boosts to it. otherwise, the gift will be sent directly from the currently logged in user, and we will gain some extra boost slots. see here for more info on giveaways and gifts.

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