update stuff

This commit is contained in:
Eartharoid
2019-05-05 22:08:30 +01:00
parent 3345539d86
commit 78ddc9c3a3
2 changed files with 11 additions and 4 deletions

View File

@@ -28,9 +28,16 @@ function init(x) {
};
};
try {
fs.appendFileSync(path, `Discord Tickets by Eartharoid | Log File (${d}/${('0' + now.getMonth()).slice(-2)}/${now.getFullYear()}) -->\n`, function (error) {
if (error) throw error;
});
if(x){
fs.appendFileSync(path, `${x} | Log File (${d}/${('0' + now.getMonth()).slice(-2)}/${now.getFullYear()}) -->\n`, function (error) {
if (error) throw error;
});
} else {
fs.appendFileSync(path, `Log File (${d}/${('0' + now.getMonth()).slice(-2)}/${now.getFullYear()}) -->\n`, function (error) {
if (error) throw error;
});
}
console.log(`[INFO | ${time()}] Creating new log file (${path})`);
} catch(error) {
console.error(leeks.colours.red(error));