diff --git a/src/commands/eval.ts b/src/commands/eval.ts index 7127763..19b0fb4 100644 --- a/src/commands/eval.ts +++ b/src/commands/eval.ts @@ -47,20 +47,21 @@ export default class Eval extends Command { this.client.signale.note('Main'); this.client.signale.note(args); try { + this.client.signale.note(evalString); evaled = await eval(evalString); this.client.signale.note('evaluated with success'); this.client.signale.note(evaled); this.client.signale.note(typeof evaled); + if (evaled === undefined) { + this.client.signale.note('Eval undefined'); + evaled = 'undefined'; + } if (typeof evaled !== 'string') { this.client.signale.note('Eval returned not a string. Depth setting:'); this.client.signale.note(depth); evaled = inspect(evaled, { depth }); this.client.signale.note('Inspected'); } - if (evaled === undefined) { - this.client.signale.note('Eval undefined'); - evaled = 'undefined'; - } } catch (error) { this.client.signale.note('Error caught'); evaled = error.stack;