aboutsummaryrefslogtreecommitdiff
path: root/src/listeners/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/listeners/commands')
-rw-r--r--src/listeners/commands/commandError.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts
index d590e06..895cff0 100644
--- a/src/listeners/commands/commandError.ts
+++ b/src/listeners/commands/commandError.ts
@@ -46,7 +46,7 @@ export default class CommandErrorListener extends BushListener {
`${isSlash ? 'slashC' : 'c'}ommandError`,
`an error occurred with the <<${command}>> ${isSlash ? 'slash ' : ''}command in <<${channel}>> triggered by <<${
message?.author?.tag
- }>>:\n${error?.stack ?? <any>error}`,
+ }>>:\n${util.formatError(error)})}`,
false
);
@@ -229,7 +229,7 @@ export default class CommandErrorListener extends BushListener {
}
public static async getErrorStack(error: Error | any): Promise<string> {
- return await util.inspectCleanRedactCodeblock(error?.stack ?? error, 'js');
+ return await util.inspectCleanRedactCodeblock(util.formatError(error), 'js');
}
}