feat: 🔧 extract the hardcoded admin and mod list out into environment variables

This commit is contained in:
jay 2021-04-23 06:07:29 +05:00
parent afd2e002df
commit ae1f7cf269

View File

@ -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: {}
}