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 env = require("dotenv-packed").parseEnv().parsed
const fs = require('fs'); const fs = require('fs');
let cfg = { const cfg = {
admin: "Applezaus", admin: process.env.MINECRAFT_PLAYER_ADMIN || env.MINECRAFT_PLAYER_ADMIN || console.warn("main: bot admin user not provided"),
mods: ["Applezaus", "tanner6", "Angram42", "[WEB] Angram42", "[WEB] Applezaus"], mods: process.env.MINECRAFT_PLAYER_MODS || env.MINECRAFT_PLAYER_MODS || [], // json array,
stateMachines: {} stateMachines: {}
} }