Link Search Menu Expand Document

Constructor: starGift

Back to constructors index

Represents a star gift, see here » for more info.

Attributes:

NameTypeRequiredDescription
limitedBoolOptionalWhether this is a limited-supply gift.
sold_outBoolOptionalWhether this gift sold out and cannot be bought anymore.
birthdayBoolOptionalWhether this is a birthday-themed gift
idlongYesIdentifier of the gift
stickerDocumentOptionalSticker that represents the gift.
starslongYesPrice of the gift in Telegram Stars.
availability_remainsintOptionalFor limited-supply gifts: the remaining number of gifts that may be bought.
availability_totalintOptionalFor limited-supply gifts: the total number of gifts that was available in the initial supply.
convert_starslongYesThe receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.
convert_stars will be equal to stars only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than stars.
first_sale_dateintOptionalFor sold out gifts only: when was the gift first bought.
last_sale_dateintOptionalFor sold out gifts only: when was the gift last bought.
upgrade_starslongOptional

Type: StarGift

Example:

$starGift = ['_' => 'starGift', 'limited' => Bool, 'sold_out' => Bool, 'birthday' => Bool, 'id' => long, 'sticker' => Document, 'stars' => long, 'availability_remains' => int, 'availability_total' => int, 'convert_stars' => long, 'first_sale_date' => int, 'last_sale_date' => int, 'upgrade_stars' => long];