Fixed datastore on server

This commit is contained in:
Emily 2020-03-09 12:40:11 +11:00
parent 0874cbc450
commit accc889ff3

View file

@ -12,20 +12,19 @@ client.logger = require('./modules/Logger');
require("./modules/functions")(client); require("./modules/functions")(client);
client.logger.setClient(client); client.logger.setClient(client);
client.commands = new Enmap();
client.aliases = new Enmap();
client.settings = new Enmap({name: 'settings', dataDir: '../data'});
client.blacklist = new Enmap({name: 'blacklist', dataDir: '../data'});
client.devmode = false;
if(process.env['USER'] != 'container') { if(process.env['USER'] != 'container') {
client.devmode = true; client.devmode = true;
}; client.settings = new Enmap({name: 'settings', dataDir: '../data'});
client.blacklist = new Enmap({name: 'blacklist', dataDir: '../data'});
if(client.devmode === false) { } else {
client.devmode = false;
const dblapi = new DBL(client.config.dblkey, client); const dblapi = new DBL(client.config.dblkey, client);
}; client.settings = new Enmap({name: 'settings'});
client.blacklist = new Enmap({name: 'blacklist'});
}
client.commands = new Enmap();
client.aliases = new Enmap();
const init = async () => { const init = async () => {
const cmdFiles = await readdir("./commands/"); const cmdFiles = await readdir("./commands/");