aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-02-13 15:14:35 -0600
committermat <27899617+mat-1@users.noreply.github.com>2021-02-13 15:14:35 -0600
commitfe139bf26b5f76db3b3e9a351300129c2497b967 (patch)
tree76200ab67499cd447d0826a755808a1a7f275fff /src
parent3ea2cf7db30bbe78748e1b9103fbe9cc9e915b0f (diff)
downloadskyblock-api-fe139bf26b5f76db3b3e9a351300129c2497b967.tar.gz
skyblock-api-fe139bf26b5f76db3b3e9a351300129c2497b967.tar.bz2
skyblock-api-fe139bf26b5f76db3b3e9a351300129c2497b967.zip
add dotenv as dev dependency
Diffstat (limited to 'src')
-rw-r--r--src/hypixelApi.ts5
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({