Skip to main content

starGift

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

type tg.StarGift struct { /* ... */ }

Implements StarGift.

Fields

NameTypeRequiredDescription
LimitedboolWhether this is a limited-supply gift.
SoldOutboolWhether this gift sold out and cannot be bought anymore.
BirthdayboolWhether this is a birthday-themed gift
RequirePremiumboolThis gift can only be bought by users with a Premium subscription.
LimitedPerUserboolIf set, the maximum number of gifts of this type that can be owned by a single user is limited and specified in per_user_total, and the remaining slots for the current user in per_user_remains.
PeerColorAvailableboolIf set, collectible gifts of this type may be used to generate a message color palette and pattern ».
AuctionboolIf set, this is a collectible gift that can only be bought through a collectible gift auction ».
IDint64yesIdentifier of the gift
StickerDocumentClassyesSticker that represents the gift.
Starsint64yesPrice of the gift in Telegram Stars.
AvailabilityRemainsintFor limited-supply gifts: the remaining number of gifts that may be bought.
AvailabilityTotalintFor limited-supply gifts: the total number of gifts that was available in the initial supply.
AvailabilityResaleint64The total number of (upgraded to collectibles) gifts of this type currently on resale
ConvertStarsint64yesThe 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.
FirstSaleDateintFor sold out gifts only: when was the gift first bought.
LastSaleDateintFor sold out gifts only: when was the gift last bought.
UpgradeStarsint64The number of Telegram Stars the user can pay to convert the gift into a collectible gift ».
ResellMinStarsint64The minimum price in Stars for gifts of this type currently on resale.
TitlestringTitle of the gift
ReleasedByPeerClassThis gift was released by the specified peer.
PerUserTotalintMaximum number of gifts of this type that can be owned by any user.
PerUserRemainsintRemaining number of gifts of this type that can be owned by the current user.
LockedUntilDateintIf set, the specified gift possibly cannot be sent until the specified date, see here » for the full flow.
AuctionSlugstringAlways set for gifts that can be bought on auctions », contains the auction deep link slug ».
GiftsPerRoundintAlways set for gifts that can be bought on auctions », contains the number of gifts of this kind that are distributed on every round.
AuctionStartDateintAlways set for gifts that can be bought on auctions », contains the UNIX timestamp indicating when will the auction start (or when the auction started, if it points to the past).
UpgradeVariantsintTotal number of possible collectible variants » for this gift type.
BackgroundStarGiftBackgroundDefault background palette for this gift type, used when rendering gift cards and previews before a specific collectible backdrop is chosen.

References