aboutsummaryrefslogtreecommitdiff
path: root/build/hypixelApi.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/hypixelApi.js')
-rw-r--r--build/hypixelApi.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/build/hypixelApi.js b/build/hypixelApi.js
index f29471a..35c3119 100644
--- a/build/hypixelApi.js
+++ b/build/hypixelApi.js
@@ -20,7 +20,8 @@ export function chooseApiKey() {
// find the api key with the lowest amount of uses
let bestKeyUsage = null;
let bestKey = null;
- for (let key of shuffle(apiKeys.slice())) {
+ // we limit to 5 api keys because otherwise they get automatically banned
+ for (let key of shuffle(apiKeys.slice(0, 5))) {
const keyUsage = apiKeyUsage[key];
// if the key has never been used before, use it
if (!keyUsage)