Raw.MessageActionGiftCode

Raw.MessageActionGiftCode

Contains a telegram premium giftcode link.

messageActionGiftCode#678c2e09 flags:# via_giveaway:flags.0?true unclaimed:flags.2?true boost_peer:flags.1?Peer months:int slug:string currency:flags.2?string amount:flags.2?long crypto_currency:flags.3?string crypto_amount:flags.3?long = MessageAction;
export namespace Raw {
  export class MessageActionGiftCode {
    constructor(params: {
      viaGiveaway?: boolean;
      unclaimed?: boolean;
      boostPeer?: Raw.TypePeer;
      months: number;
      slug: string;
      currency?: string;
      amount?: bigint;
      cryptoCurrency?: string;
      cryptoAmount?: bigint;
    }) {}
  }
}
🚫

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

Layer: 185
Constructor ID: 0x678c2e09

Property

  • viaGiveaway : boolean or undefined

    If set, this gift code was received from a giveaway started by a channel/supergroup we’re subscribed to.

  • unclaimed : boolean or undefined

    If set, the link was not redeemed yet.

  • boostPeer : Raw.TypePeer or undefined

    Identifier of the channel/supergroup that created the gift code either directly or through a giveaway: if we import this giftcode link, we will also automatically boost this channel/supergroup.

  • months : number

    Duration in months of the gifted telegram premium subscription.

  • slug : string

    Slug of the telegram premium giftcode link

  • currency : string or undefined

    Three-letter iso 4217 currency code

  • amount : bigint or undefined

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

  • cryptoCurrency : string or undefined

    If set, the gift was made using the specified cryptocurrency.

  • cryptoAmount : bigint or undefined

    If cryptoCurrency is set, contains the paid amount, in the smallest units of the cryptocurrency.