diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-04-16 14:11:13 -0500 |
---|---|---|
committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-04-16 14:11:13 -0500 |
commit | 14ab63a82d750e897b4db2bd558ebbdb9fa0159c (patch) | |
tree | 2e1598a3bf4aa50d7c84f857288d686082b0fb91 /build | |
parent | aa9ebf76317c579361ed3f6290558179cd266a31 (diff) | |
download | skyblock-api-14ab63a82d750e897b4db2bd558ebbdb9fa0159c.tar.gz skyblock-api-14ab63a82d750e897b4db2bd558ebbdb9fa0159c.tar.bz2 skyblock-api-14ab63a82d750e897b4db2bd558ebbdb9fa0159c.zip |
Update hypixelApi.js
Diffstat (limited to 'build')
-rw-r--r-- | build/hypixelApi.js | 5 |
1 files changed, 5 insertions, 0 deletions
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] = { |