From ae1f7cf269b97822802a4457dcaef23160d5a651 Mon Sep 17 00:00:00 2001 From: jay Date: Fri, 23 Apr 2021 06:07:29 +0500 Subject: [PATCH] feat: :wrench: extract the hardcoded admin and mod list out into environment variables --- lib/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index 72d5454..9c102d4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,8 +1,8 @@ const env = require("dotenv-packed").parseEnv().parsed const fs = require('fs'); -let cfg = { - admin: "Applezaus", - mods: ["Applezaus", "tanner6", "Angram42", "[WEB] Angram42", "[WEB] Applezaus"], +const cfg = { + admin: process.env.MINECRAFT_PLAYER_ADMIN || env.MINECRAFT_PLAYER_ADMIN || console.warn("main: bot admin user not provided"), + mods: process.env.MINECRAFT_PLAYER_MODS || env.MINECRAFT_PLAYER_MODS || [], // json array, stateMachines: {} }