aboutsummaryrefslogtreecommitdiff
path: root/src/listeners/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-05-27 22:39:07 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-05-27 22:39:07 -0400
commit94c20f17f1a87e594fc07a75eb6026891086c67c (patch)
treef32942ce07630352afbf4d7be2b718fc9724502c /src/listeners/commands
parentf718df9321f2ff28a5a1f20d53e474fbf5998d6e (diff)
downloadtanzanite-94c20f17f1a87e594fc07a75eb6026891086c67c.tar.gz
tanzanite-94c20f17f1a87e594fc07a75eb6026891086c67c.tar.bz2
tanzanite-94c20f17f1a87e594fc07a75eb6026891086c67c.zip
fix: use util#formatError
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');
}
}