From 5ce5b7f64dc91d10c4c01ec368ffcc02272407cf Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 27 Oct 2019 21:53:16 -0400 Subject: [PATCH] another fix attempt on eval --- src/commands/eval.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/commands/eval.ts b/src/commands/eval.ts index f10df56..ea46f62 100644 --- a/src/commands/eval.ts +++ b/src/commands/eval.ts @@ -19,7 +19,6 @@ export default class Eval extends Command { try { // const evalMessage = message.content.slice(this.client.config.prefix.length).split(' ').slice(1).join(' '); let evaled: any; - let output: string; try { evaled = await eval(args.join(' ').trim()); @@ -27,7 +26,7 @@ export default class Eval extends Command { evaled = inspect(evaled, { depth: 0 }); } } catch (error) { - output = error.stack; + evaled = error.stack; } /* @@ -38,9 +37,7 @@ export default class Eval extends Command { } */ - this.client.signale.debug(output); - const display = this.client.util.splitString(output, 1975); - this.client.signale.debug(display); + const display = this.client.util.splitString(evaled, 1975); if (display[5]) { try { const { data } = await axios.post('https://snippets.cloud.libraryofcode.org/documents', display.join(''));