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 undefinedWhether this is a limited-supply gift.
soldOut
: boolean or undefinedWhether this gift sold out and cannot be bought anymore.
birthday
: boolean or undefinedWhether this is a birthday-themed gift
id
: bigintIdentifier of the gift
sticker
: Raw.TypeDocumentSticker that represents the gift.
stars
: bigintPrice of the gift in telegram stars.
availabilityRemains
: number or undefinedFor limited-supply gifts: the remaining number of gifts that may be bought.
availabilityTotal
: number or undefinedFor limited-supply gifts: the total number of gifts that was available in the initial supply.
convertStars
: bigintThe 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 undefinedFor sold out gifts only: when was the gift first bought.
lastSaleDate
: number or undefinedFor sold out gifts only: when was the gift last bought.
upgradeStars
: bigint or undefined