types: add RateLimitData interface

This commit is contained in:
ayntee
2021-03-27 16:59:19 +04:00
parent 2806dc3d04
commit d2cb96ac86

View File

@@ -292,6 +292,21 @@ export interface EventHandlers {
inviteDelete?: (data: CamelCaseProps<InviteDeleteEvent>) => unknown;
}
export interface RateLimitData {
/** The number of remaining requests that can be made */
remaining: string | null;
/** Epoch time (seconds since 00:00:00 UTC on January 1, 1970) at which the rate limit resets */
resetTimestamp: string | null;
/** Total time (in seconds) of when the current rate limit bucket will reset. Can have decimals to match previous millisecond ratelimit precision */
retryAfter: string | null;
/** Returned only on a HTTP 429 response if the rate limit headers returned are of the global rate limit (not per-route) */
global: string | null;
/** A unique string denoting the rate limit being encountered (non-inclusive of major parameters in the route path) */
bucketID: string | null;
/** The URL the HTTP request is made to */
url: string;
}
export interface BotConfig {
token: string;
compress?: boolean;