From 14ab63a82d750e897b4db2bd558ebbdb9fa0159c Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Fri, 16 Apr 2021 14:11:13 -0500 Subject: Update hypixelApi.js --- build/hypixelApi.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'build/hypixelApi.js') diff --git a/build/hypixelApi.js b/build/hypixelApi.js index e4ba7ff..2100bfc 100644 --- a/build/hypixelApi.js +++ b/build/hypixelApi.js @@ -62,6 +62,11 @@ async function sendApiRequest({ path, key, args }) { await new Promise((resolve) => setTimeout(resolve, 1000)); 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] = { -- cgit