diff options
Diffstat (limited to 'build/hypixelApi.js')
-rw-r--r-- | build/hypixelApi.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/build/hypixelApi.js b/build/hypixelApi.js index c1fc87a..c9621eb 100644 --- a/build/hypixelApi.js +++ b/build/hypixelApi.js @@ -62,7 +62,8 @@ async function sendApiRequest({ path, key, args }) { }; const fetchJsonParsed = await fetchResponse.json(); if (fetchJsonParsed.throttle) { - apiKeyUsage[key].remaining = 0; + if (apiKeyUsage[key]) + apiKeyUsage[key].remaining = 0; console.log('throttled :('); return { throttled: true }; } |