interface RateLimitData

external
interface RateLimitData

Data emitted on RESTEvents.RateLimited

Constructors

constructor()

external
global : boolean

Whether the rate limit that was reached was the global limit

external
hash : string

The bucket hash for this request

external
limit : number

The amount of requests we can perform before locking requests

external
majorParameter : string

The major parameter of the routeFor example, in /channels/x, this will be x. If there is no major parameter (e.g: /bot/gateway) this will be global.

external
method : string

The HTTP method being performed

external
retryAfter : number

The time, in milliseconds, that will need to pass before this specific request can be retried

external
route : string

The route being hit in this request

external
scope : 'global' | 'shared' | 'user'

The scope of the rate limit that was hit.This can be user for rate limits that are per client, global for rate limits that affect all clients or shared for rate limits that are shared per resource.

external
sublimitTimeout : number

The time, in milliseconds, that will need to pass before the sublimit lock for the route resets, and requests that fall under a sublimit can be retriedThis is only present on certain sublimits, and 0 otherwise

external
timeToReset : number

The time, in milliseconds, until the route's request-lock is reset

external
url : string

The full URL for this request