diff --git a/src/client/datastore.js b/src/client/datastore.js index 7d94ee4..f6cd119 100644 --- a/src/client/datastore.js +++ b/src/client/datastore.js @@ -9,10 +9,10 @@ module.exports = class { loadData() { //console.log(""); - const dataFiles = fs.readdirSync("D:/GitHub/eximiabots-radiox/datastore"/*path.join(path.dirname(__dirname), 'datastore')*/).filter(f => f.endsWith('.json')); + const dataFiles = fs.readdirSync(path.join(path.dirname(__dirname), '../datastore')).filter(f => f.endsWith('.json')); for (const file of dataFiles) { try { - const json = require(`../../datastore/${file}`); + const json = require(`../../../datastore/${file}`); this.map.set(json.guild.id, json); //console.log('[LOADED] ' + file + " (" + json.guild.id + ")"); //console.log(JSON.stringify(json, null, 4)); @@ -115,7 +115,7 @@ module.exports = class { saveEntry(file, data) { data = JSON.stringify(data, null, 4); - fs.writeFile(path.join(path.dirname(__dirname), 'datastore') + "/" + file + ".json", data, 'utf8', function(err) { + fs.writeFile(path.join(path.dirname(__dirname), '../datastore') + "/" + file + ".json", data, 'utf8', function(err) { if (err) { //console.log(err); }