diff --git a/src/schemas/tokebot/tokeSchema.js b/src/schemas/tokebot/tokeSchema.js index cc9d487..14ddeb7 100644 --- a/src/schemas/tokebot/tokeSchema.js +++ b/src/schemas/tokebot/tokeSchema.js @@ -90,9 +90,7 @@ tokeSchema.statics.calculateTokeMap = async function(){ } //Display calculated toke sats for funsies - if(config.verbose){ - console.log(`Processed ${this.commandCount} toke command callouts accross ${this.count} tokes, averaging ${(this.commandCount/this.count).toFixed(3)} tokers per toke.`); - } + console.log(`Processed ${this.commandCount} toke command callouts accross ${this.count} tokes, averaging ${(this.commandCount/this.count).toFixed(3)} tokers per toke.`); } /** diff --git a/src/utils/loggerUtils.js b/src/utils/loggerUtils.js index 1835e58..4259e56 100644 --- a/src/utils/loggerUtils.js +++ b/src/utils/loggerUtils.js @@ -65,8 +65,8 @@ module.exports.errorHandler = function(res, msg, type = "Generic", status = 400) * @param {Error} err - Exception to handle */ module.exports.localExceptionHandler = function(err){ - //If we're being verbose and this isn't just a basic bitch - if(!err.custom && config.verbose){ + //If this wasn't made by exceptionSmith + if(!err.custom){ //Log the error module.exports.dumpError(err); } @@ -188,6 +188,12 @@ module.exports.dumpError = async function(err, date = new Date(), subDir = 'cras //Generate content from error const content = `Error Date: ${date.toLocaleString()} (UTC-${date.getTimezoneOffset()/60})\nError Type: ${err.name}\nError Msg:${err.message}\nStack Trace:\n\n${err.stack}`; + //if we're not muzzled and the server is in screamy boi mode + if(!muzzle && config.verbose){ + //Dump error to console + console.log(err); + } + //Dump text to file module.exports.dumpLog(content, date.getTime(), subDir, muzzle); }