diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-07-06 20:28:04 +0200 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-07-06 20:28:04 +0200 |
commit | 22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b (patch) | |
tree | ab7f68cb9168d2b06ba144b48311370059cf5fac /src/commands/dev/sh.ts | |
parent | 544f94704c9dd37913de11eab67cd594d17fcd87 (diff) | |
download | tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.tar.gz tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.tar.bz2 tanzanite-22b3a8af49dc16bf5d8f9c3ce48b4770505ea33b.zip |
remove array from add*(...)
Diffstat (limited to 'src/commands/dev/sh.ts')
-rw-r--r-- | src/commands/dev/sh.ts | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts index 7ffdf27..1b9ce22 100644 --- a/src/commands/dev/sh.ts +++ b/src/commands/dev/sh.ts @@ -59,10 +59,10 @@ export default class ShCommand extends BushCommand { .setFooter({ text: message.author.tag, iconURL: message.author.avatarURL() ?? undefined }) .setTimestamp() .setTitle('Shell Command') - .addFields([ + .addFields( { name: '📥 Input', value: await this.client.utils.codeblock(input, 1024, 'sh', true) }, { name: 'Running', value: emojis.loading } - ]); + ); await message.util.reply({ embeds: [embed] }); @@ -80,14 +80,12 @@ export default class ShCommand extends BushCommand { embed.setTitle(`${emojis.successFull} Executed command successfully.`).setColor(colors.success).spliceFields(1, 1); - if (stdout) embed.addFields([{ name: '📤 stdout', value: await this.client.utils.codeblock(stdout, 1024, 'ansi', true) }]); - if (stderr) embed.addFields([{ name: '📤 stderr', value: await this.client.utils.codeblock(stderr, 1024, 'ansi', true) }]); + if (stdout) embed.addFields({ name: '📤 stdout', value: await this.client.utils.codeblock(stdout, 1024, 'ansi', true) }); + if (stderr) embed.addFields({ name: '📤 stderr', value: await this.client.utils.codeblock(stderr, 1024, 'ansi', true) }); } catch (e) { embed.setTitle(`${emojis.errorFull} An error occurred while executing.`).setColor(colors.error).spliceFields(1, 1); - embed.addFields([ - { name: '📤 Output', value: await this.client.utils.codeblock(formatError(e, true), 1024, 'ansi', true) } - ]); + embed.addFields({ name: '📤 Output', value: await this.client.utils.codeblock(formatError(e, true), 1024, 'ansi', true) }); } await message.util.edit({ embeds: [embed] }); } |