Raw.StarGift

Raw.StarGift

Represents a star gift, see here for more info.

starGift#2cc73c8 flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int upgrade_stars:flags.3?long = StarGift;
export namespace Raw {
  export class StarGift {
    constructor(params: {
      limited?: boolean;
      soldOut?: boolean;
      birthday?: boolean;
      id: bigint;
      sticker: Raw.TypeDocument;
      stars: bigint;
      availabilityRemains?: number;
      availabilityTotal?: number;
      convertStars: bigint;
      firstSaleDate?: number;
      lastSaleDate?: number;
      upgradeStars?: bigint;
    }) {}
  }
}
🚫

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

Layer: 198
Constructor ID: 0x2cc73c8

Property

  • limited : boolean or undefined

    Whether this is a limited-supply gift.

  • soldOut : boolean or undefined

    Whether this gift sold out and cannot be bought anymore.

  • birthday : boolean or undefined

    Whether this is a birthday-themed gift

  • id : bigint

    Identifier of the gift

  • sticker : Raw.TypeDocument

    Sticker that represents the gift.

  • stars : bigint

    Price of the gift in telegram stars.

  • availabilityRemains : number or undefined

    For limited-supply gifts: the remaining number of gifts that may be bought.

  • availabilityTotal : number or undefined

    For limited-supply gifts: the total number of gifts that was available in the initial supply.

  • convertStars : bigint

    The receiver of this gift may convert it to this many telegram stars, instead of displaying it on their profile page.convertStars will be equal to stars only if the gift was bought using recently bought telegram stars, otherwise it will be less than stars.

  • firstSaleDate : number or undefined

    For sold out gifts only: when was the gift first bought.

  • lastSaleDate : number or undefined

    For sold out gifts only: when was the gift last bought.

  • upgradeStars : bigint or undefined