diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hypixelApi.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hypixelApi.ts b/src/hypixelApi.ts index ee63155..f4c9817 100644 --- a/src/hypixelApi.ts +++ b/src/hypixelApi.ts @@ -151,6 +151,12 @@ export async function sendApiRequest({ path, key, args }): Promise<HypixelRespon return await sendApiRequest({ path, key, args }) } + // bruh + if (fetchJsonParsed.cause === 'This endpoint is currently disabled') { + await new Promise((resolve) => setTimeout(resolve, 30000)) + return await sendApiRequest({ path, key, args }) + } + if (fetchResponse.headers['ratelimit-limit']) // remember how many uses it has apiKeyUsage[key] = { |