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