mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-06-17 06:55:59 +00:00
Create datastore folder
This commit is contained in:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user