From ad5662c565275e64cf37657c807d304824e379b0 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 13 May 2020 23:00:43 +0100 Subject: [PATCH] Should stop undefined spamming in error channel --- src/class/Util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index 7bc3c76..4083c10 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -73,7 +73,7 @@ export default class Util { public async handleError(error: Error, message?: Message, command?: Command, disable = true): Promise { try { this.signale.error(error); - const info = { content: `\`\`\`js\n${error.stack}\n\`\`\``, embed: null }; + const info = { content: `\`\`\`js\n${error.stack || error}\n\`\`\``, embed: null }; if (message) { const embed = new RichEmbed(); embed.setColor('FF0000');