RateLimit

Maintains its own call count and expiry for making sure things only happen a certain number of times within a given timeframe

Constructor

new RateLimit(limit: Tuple<number, number>)

Parameters:
Name Type Description
limit
Tuple<number, number>

Tuple containing quantity and duration

Source:

Properties

.isLimited

Return whether or not this ratelimit is currently capped out

Source:

.wasNotified

Return whether or not this RateLimit was flagged after notifying the user of being rate limited

Source:

Methods

.call() → boolean

Returns whether or not this rate limit has been capped out for its current expiry window while incrementing calls towards the rate limit cap if not currently capped

Source:
Returns:
boolean

.setNotified() → void

Flag this RateLimit as having had the user the RateLimit is for notified of being rate limited

Source:
Returns:
void