mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 17:00:08 +00:00
types: add RateLimitData interface
This commit is contained in:
15
src/bot.ts
15
src/bot.ts
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user