forked from afspiegeling/NitoriBot
removed reload since i basically dont ever use it. removed xml for the same reason as reload. added es6 support for commands only. added back chat_command_handler.js moved checks to src/util/checks.js v6.0.7 build: 1080
24 lines
972 B
JavaScript
24 lines
972 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
module.exports = () => {
|
|
if (!fs.existsSync(path.join(__dirname, "../../config.yml"))) {
|
|
console.warn("Config not found creating config from the default config");
|
|
fs.copyFileSync(
|
|
path.join(__dirname, "../data/default_config.yml"),
|
|
path.join(__dirname, "../../config.yml")
|
|
)
|
|
}
|
|
|
|
if (!fs.existsSync(path.join(__dirname, "../data/filter.json"))) {
|
|
console.warn("filter json not found creating the file,......");
|
|
let data = [{ ignoreCase: false, regexed: false, name: 'whatever player username idfk' }]
|
|
fs.writeFileSync(path.join(__dirname, "../data/filter.json"), JSON.stringify(data))
|
|
}
|
|
|
|
if (!fs.existsSync(path.join(__dirname, "../data/trustedPlayers.json"))) {
|
|
console.warn("Trusted Players json not found creating the file,......");
|
|
let data = [{player: ""}]
|
|
fs.writeFileSync(path.join(__dirname, "../data/trustedPlayers.json"), JSON.stringify(data))
|
|
}
|
|
}
|