diff options
Diffstat (limited to 'src/hypixelApi.ts')
-rw-r--r-- | src/hypixelApi.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hypixelApi.ts b/src/hypixelApi.ts index cb8f0e0..2f66343 100644 --- a/src/hypixelApi.ts +++ b/src/hypixelApi.ts @@ -4,7 +4,10 @@ import fetch from 'node-fetch' import { jsonToQuery, shuffle } from './util' import { Agent } from 'https' -require('dotenv').config() + +if (!process.env.hypixel_keys) + // if there's no hypixel keys in env, run dotenv + require('dotenv').config() // We need to create an agent to prevent memory leaks and to only do dns lookups once const httpsAgent = new Agent({ |