2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-31 06:05:22 +00:00

index.js: Make sure data folder gets automatically created

This commit is contained in:
Martin Rys
2022-03-26 13:57:00 +01:00
parent 117c0c7f59
commit d411c977a6

View File

@@ -4,6 +4,12 @@
process.chdir(__dirname);
require('ts-node').register({ transpileOnly: true });
// Make sure data folder exists
var fs = require('fs');
if (!fs.existsSync('./data')){
fs.mkdirSync('./data');
}
// Utils
const { logError } = require('./utils/log');