diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-09 22:26:24 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-09 22:26:24 -0500 |
commit | 523528874cba7d8b1837cda74fab6e089d57c33c (patch) | |
tree | b098338ee59cb266dce20dae217d7d62f439ea57 | |
parent | 0e56958b8dff05ac28a9a2c32c4a74f83e24d5ac (diff) | |
download | tanzanite-523528874cba7d8b1837cda74fab6e089d57c33c.tar.gz tanzanite-523528874cba7d8b1837cda74fab6e089d57c33c.tar.bz2 tanzanite-523528874cba7d8b1837cda74fab6e089d57c33c.zip |
fix(commandError): check description length in _generateErrorEmbed
-rw-r--r-- | src/listeners/commands/commandError.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index ba27706..78bb165 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -143,9 +143,8 @@ export default class CommandErrorListener extends BushListener { description.push(...options.haste); - embed - .addField({ name: 'Stack Trace', value: options.stack.substring(0, 1024) }) - .setDescription(description.join('\n').substring(0, 4000)); + embed.addField({ name: 'Stack Trace', value: options.stack.substring(0, 1024) }); + if (description.length) embed.setDescription(description.join('\n').substring(0, 4000)); if (options.type === 'command-dev' || options.type === 'command-log') embed.setTitle(`${options.isSlash ? 'Slash ' : ''}CommandError #\`${options.errorNum}\``); |