mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-22 16:23:18 +00:00
Create datastore folder
This commit is contained in:
parent
308afd9f96
commit
b01ee3b380
@ -8,6 +8,10 @@ module.exports = class {
|
||||
}
|
||||
|
||||
loadData() {
|
||||
const dir = path.join(path.dirname(__dirname), '../datastore');
|
||||
if (!fs.existsSync(dir)) {
|
||||
fs.mkdirSync(dir);
|
||||
}
|
||||
//console.log("");
|
||||
const dataFiles = fs.readdirSync(path.join(path.dirname(__dirname), '../datastore')).filter(f => f.endsWith('.json'));
|
||||
for (const file of dataFiles) {
|
||||
|
Loading…
Reference in New Issue
Block a user