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

View File

@ -80,7 +80,7 @@ console.log(leeks.colours.yellow(leeks.styles.bold(homepage)));
console.log('\n\n'); console.log('\n\n');
console.log(leeks.colours.bgGrey(leeks.colours.grey(`\n\n==========================================================================\n\n`))) console.log(leeks.colours.bgGrey(leeks.colours.grey(`\n\n==========================================================================\n\n`)))
console.log('\n\n'); console.log('\n\n');
log.init() log.init('DiscordTickets (bot created by Eartharoid)')
// all log.* functions are logged to ./log/file.log from here onwards // all log.* functions are logged to ./log/file.log from here onwards
log.info(`Starting up...`) log.info(`Starting up...`)