mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
feat: expose Retry-After and sublimit timeouts in RatelimitData (#9864)
* feat: expose Retry-After and sublimit timeouts in RatelimitData * chore: better docs? * Apply suggestions from code review Co-authored-by: ckohen <chaikohen@gmail.com> --------- Co-authored-by: ckohen <chaikohen@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -155,12 +155,23 @@ export interface RateLimitData {
|
||||
* The HTTP method being performed
|
||||
*/
|
||||
method: string;
|
||||
/**
|
||||
* The time, in milliseconds, that will need to pass before this specific request can be retried
|
||||
*/
|
||||
retryAfter: number;
|
||||
/**
|
||||
* The route being hit in this request
|
||||
*/
|
||||
route: string;
|
||||
/**
|
||||
* The time, in milliseconds, until the request-lock is reset
|
||||
* 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 retried
|
||||
*
|
||||
* This is only present on certain sublimits, and `0` otherwise
|
||||
*/
|
||||
sublimitTimeout: number;
|
||||
/**
|
||||
* The time, in milliseconds, until the route's request-lock is reset
|
||||
*/
|
||||
timeToReset: number;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user