aboutsummaryrefslogtreecommitdiff
path: root/src/hypixelApi.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/hypixelApi.ts')
-rw-r--r--src/hypixelApi.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hypixelApi.ts b/src/hypixelApi.ts
index d39b155..9a0a6da 100644
--- a/src/hypixelApi.ts
+++ b/src/hypixelApi.ts
@@ -36,7 +36,8 @@ export function chooseApiKey(): string | null {
// find the api key with the lowest amount of uses
let bestKeyUsage: KeyUsage | null = null
let bestKey: string | null = 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