From 94c20f17f1a87e594fc07a75eb6026891086c67c Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Fri, 27 May 2022 22:39:07 -0400 Subject: fix: use util#formatError --- src/commands/dev/reload.ts | 2 +- src/commands/dev/sh.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/commands/dev') diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts index d874c83..17802b0 100644 --- a/src/commands/dev/reload.ts +++ b/src/commands/dev/reload.ts @@ -47,7 +47,7 @@ export default class ReloadCommand extends BushCommand { } catch (e) { if (output!) void client.logger.error('reloadCommand', output); return message.util.send( - `An error occurred while reloading:\n${await util.codeblock(e?.stack || e, 2048 - 34, 'js', true)}` + `An error occurred while reloading:\n${await util.codeblock(util.formatError(e), 2048 - 34, 'js', true)}` ); } } diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts index be6a015..e071e73 100644 --- a/src/commands/dev/sh.ts +++ b/src/commands/dev/sh.ts @@ -82,7 +82,7 @@ export default class ShCommand extends BushCommand { .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(util.formatError(e), 1024, 'js', true) }]); } await message.util.edit({ embeds: [embed] }); } -- cgit