aboutsummaryrefslogtreecommitdiff
path: root/src/commands/dev/sh.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/dev/sh.ts')
-rw-r--r--src/commands/dev/sh.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts
index f3fe86b..be6a015 100644
--- a/src/commands/dev/sh.ts
+++ b/src/commands/dev/sh.ts
@@ -50,8 +50,10 @@ export default class ShCommand extends BushCommand {
.setFooter({ text: message.author.tag, iconURL: message.author.avatarURL() ?? undefined })
.setTimestamp()
.setTitle('Shell Command')
- .addFields({ name: '📥 Input', value: await util.codeblock(input, 1024, 'sh', true) })
- .addFields({ name: 'Running', value: util.emojis.loading });
+ .addFields([
+ { name: '📥 Input', value: await util.codeblock(input, 1024, 'sh', true) },
+ { name: 'Running', value: util.emojis.loading }
+ ]);
await message.util.reply({ embeds: [embed] });
@@ -72,15 +74,15 @@ export default class ShCommand extends BushCommand {
.setColor(util.colors.success)
.spliceFields(1, 1);
- if (stdout) embed.addFields({ name: '📤 stdout', value: await util.codeblock(stdout, 1024, 'json', true) });
- if (stderr) embed.addFields({ name: '📤 stderr', value: await util.codeblock(stderr, 1024, 'json', true) });
+ if (stdout) embed.addFields([{ name: '📤 stdout', value: await util.codeblock(stdout, 1024, 'json', true) }]);
+ if (stderr) embed.addFields([{ name: '📤 stderr', value: await util.codeblock(stderr, 1024, 'json', true) }]);
} catch (e) {
embed
.setTitle(`${util.emojis.errorFull} An error occurred while executing.`)
.setColor(util.colors.error)
.spliceFields(1, 1);
- embed.addFields({ name: '📤 Output', value: await util.codeblock(e?.stack, 1024, 'js', true) });
+ embed.addFields([{ name: '📤 Output', value: await util.codeblock(e?.stack, 1024, 'js', true) }]);
}
await message.util.edit({ embeds: [embed] });
}