Order fix and more diagnosis
parent
59ae64b08f
commit
9809f32ee0
|
@ -47,20 +47,21 @@ export default class Eval extends Command {
|
||||||
this.client.signale.note('Main');
|
this.client.signale.note('Main');
|
||||||
this.client.signale.note(args);
|
this.client.signale.note(args);
|
||||||
try {
|
try {
|
||||||
|
this.client.signale.note(evalString);
|
||||||
evaled = await eval(evalString);
|
evaled = await eval(evalString);
|
||||||
this.client.signale.note('evaluated with success');
|
this.client.signale.note('evaluated with success');
|
||||||
this.client.signale.note(evaled);
|
this.client.signale.note(evaled);
|
||||||
this.client.signale.note(typeof evaled);
|
this.client.signale.note(typeof evaled);
|
||||||
|
if (evaled === undefined) {
|
||||||
|
this.client.signale.note('Eval undefined');
|
||||||
|
evaled = 'undefined';
|
||||||
|
}
|
||||||
if (typeof evaled !== 'string') {
|
if (typeof evaled !== 'string') {
|
||||||
this.client.signale.note('Eval returned not a string. Depth setting:');
|
this.client.signale.note('Eval returned not a string. Depth setting:');
|
||||||
this.client.signale.note(depth);
|
this.client.signale.note(depth);
|
||||||
evaled = inspect(evaled, { depth });
|
evaled = inspect(evaled, { depth });
|
||||||
this.client.signale.note('Inspected');
|
this.client.signale.note('Inspected');
|
||||||
}
|
}
|
||||||
if (evaled === undefined) {
|
|
||||||
this.client.signale.note('Eval undefined');
|
|
||||||
evaled = 'undefined';
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.client.signale.note('Error caught');
|
this.client.signale.note('Error caught');
|
||||||
evaled = error.stack;
|
evaled = error.stack;
|
||||||
|
|
Loading…
Reference in New Issue