Raw.MessageActionGiftStars

Raw.MessageActionGiftStars

You gifted or were gifted some telegram stars.

messageActionGiftStars#45d5b021 flags:# currency:string amount:long stars:long crypto_currency:flags.0?string crypto_amount:flags.0?long transaction_id:flags.1?string = MessageAction;
export namespace Raw {
  export class MessageActionGiftStars {
    constructor(params: {
      currency: string;
      amount: bigint;
      stars: bigint;
      cryptoCurrency?: string;
      cryptoAmount?: bigint;
      transactionId?: string;
    }) {}
  }
}
🚫

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

Layer: 198
Constructor ID: 0x45d5b021

Property

  • currency : string

    Three-letter iso 4217 currency code

  • amount : bigint

    Price of the gift 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).

  • stars : bigint

    Amount of gifted stars

  • cryptoCurrency : string or undefined

    If the gift was bought using a cryptocurrency, the cryptocurrency name.

  • cryptoAmount : bigint or undefined

    If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency.

  • transactionId : string or undefined

    Identifier of the transaction, only visible to the receiver of the gift.