aboutsummaryrefslogtreecommitdiff
path: root/src/commands/dev/eval.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-04 16:26:56 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-04 16:26:56 -0400
commit153a40fbcd314459f94d9a2b44d3466c930c4e35 (patch)
tree5c853355da693e68c393b38c0c66a1f84ef0ac89 /src/commands/dev/eval.ts
parentcf564dbb6435886f97e2e9870363144386af368d (diff)
downloadtanzanite-153a40fbcd314459f94d9a2b44d3466c930c4e35.tar.gz
tanzanite-153a40fbcd314459f94d9a2b44d3466c930c4e35.tar.bz2
tanzanite-153a40fbcd314459f94d9a2b44d3466c930c4e35.zip
cleaned up
Diffstat (limited to 'src/commands/dev/eval.ts')
-rw-r--r--src/commands/dev/eval.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts
index ebf055b..82b0e5e 100644
--- a/src/commands/dev/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -1,3 +1,4 @@
+/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-unused-vars */
import { exec } from 'child_process';
import { Constants } from 'discord-akairo';
@@ -198,7 +199,6 @@ export default class EvalCommand extends BushCommand {
MessageSelectMenu,
ReactionCollector,
Util
- // eslint-disable-next-line @typescript-eslint/no-var-requires
} = require('discord.js'); // I would use import here but esbuild doesn't like that
if (code[code.lang].replace(/ /g, '').includes('9+10' || '10+9')) {
output = 21;
@@ -259,7 +259,7 @@ export default class EvalCommand extends BushCommand {
} else {
embed.addField('📥 Input', await this.client.util.codeblock(inputJS, 1024, 'js'));
}
- embed.addField('📤 Output', await this.client.util.codeblock(typeof e === 'object' ? e?.stack : e, 1024, 'js'));
+ embed.addField('📤 Output', await this.client.util.codeblock(e?.stack || e, 1024, 'js'));
}
if (!args.silent && !message.util.isSlash) {
await message.util.reply({ embeds: [embed], ephemeral: args.silent });
@@ -269,7 +269,7 @@ export default class EvalCommand extends BushCommand {
try {
await message.author.send({ embeds: [embed] });
if (!args.deleteMSG) await (message as BushMessage).react(this.client.util.emojis.successFull);
- } catch (e) {
+ } catch {
if (!args.deleteMSG) await (message as BushMessage).react(this.client.util.emojis.errorFull);
}
}