mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-09-02 15:15:20 +00:00
index.js: Make sure data folder gets automatically created
This commit is contained in:
6
index.js
6
index.js
@@ -4,6 +4,12 @@
|
|||||||
process.chdir(__dirname);
|
process.chdir(__dirname);
|
||||||
require('ts-node').register({ transpileOnly: true });
|
require('ts-node').register({ transpileOnly: true });
|
||||||
|
|
||||||
|
// Make sure data folder exists
|
||||||
|
var fs = require('fs');
|
||||||
|
if (!fs.existsSync('./data')){
|
||||||
|
fs.mkdirSync('./data');
|
||||||
|
}
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
const { logError } = require('./utils/log');
|
const { logError } = require('./utils/log');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user