starGiftAuctionState #

Represents an active or pending auction ».

Layer 223

starGiftAuctionState#771a4e66 version:int start_date:int end_date:int min_bid_amount:long bid_levels:Vector<AuctionBidLevel> top_bidders:Vector<long> next_round_at:int last_gift_num:int gifts_left:int current_round:int total_rounds:int rounds:Vector<StarGiftAuctionRound> = StarGiftAuctionState;

Parameters #

NameTypeDescription
versionintOnly apply incoming starGiftAuctionState constructors if the received version is bigger than the locally cached version.
start_dateintUNIX timestamp indicating when the auction will start (or when it started, if it's in the past).
end_dateintUNIX timestamp indicating when the auction will end
min_bid_amountlongMinumum allowed bid amount in Telegram Stars: only applicable if the user hasn't made a bid yet, otherwise must be overridden to the value of starGiftAuctionUserState.min_bid_amount (which will be set if and only if the user already made a bid to this auction).
bid_levelsVector<AuctionBidLevel>Contains a sparse list of bids starting from the top bids, a more detailed description is available in the docs.
top_biddersVector<long>User IDs of the top 3 bidders (the user constructors will be returned as min constructors in the containing object).
next_round_atintUNIX timestamp indicating when the current auction round will end, distributing starGift.gifts_per_round gifts to the top starGift.gifts_per_round bidders.
last_gift_numintThe number of gifts that were distributed in the previous round (also used to compute the approximated index of the gift that the current user will receive, last_gift_num + approx_pos, see here » for more info).
gifts_leftintThe remaining number of gifts that are yet to be distributed.
current_roundintThe current round number (starting from 1).
total_roundsintThe total number of rounds in this auction.
roundsVector<StarGiftAuctionRound>Detailed round information.

Type #

StarGiftAuctionState

starGiftAuctionState #

Represents an active or pending auction ».

Telegram Stars #

Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.

starGiftAuctionUserState #

Contains information about the current user's state in an auction ».

The bid_amount, bid_date, bid_peer and min_bid_amount flags of starGiftAuctionUserState will all be set if the user placed a bid in the auction.

Collectible gift auctions #

New collectible gift releases are distributed through Stars auctions held over several rounds.

user #

Indicates info about a certain user.

Unless specified otherwise, when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).

See here » for an implementation of the logic to use when updating the local user peer database.

Min constructors #

In some situations user and channel constructors have reduced set of fields present (although id is always there) and min flag set.

starGift #

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