diff options
| author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-10 10:27:35 -0400 |
|---|---|---|
| committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-10 10:27:35 -0400 |
| commit | 5a0046146fb2a697aead63d2af492db9f0ef9113 (patch) | |
| tree | 981bf0808e465d5d692482d18437c80715ae3563 /src/listeners | |
| parent | f1973996dc5f1790df3f72af75732a0d250a14e2 (diff) | |
| download | tanzanite-5a0046146fb2a697aead63d2af492db9f0ef9113.tar.gz tanzanite-5a0046146fb2a697aead63d2af492db9f0ef9113.tar.bz2 tanzanite-5a0046146fb2a697aead63d2af492db9f0ef9113.zip | |
update discord js and discord-akairo
fix breaking changes
add unverified bot emoji to user command
Diffstat (limited to 'src/listeners')
| -rw-r--r-- | src/listeners/commands/commandError.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index 04ea517..f12881a 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -1,6 +1,7 @@ import { capitalize, colors, format, formatError, SlashMessage, type BushCommandHandlerEvents } from '#lib'; import { type AkairoMessage, type Command } from 'discord-akairo'; -import { ChannelType, Client, EmbedBuilder, escapeInlineCode, Formatters, GuildTextBasedChannel, type Message } from 'discord.js'; +import { ChannelType, Client, EmbedBuilder, escapeInlineCode, GuildTextBasedChannel, type Message } from 'discord.js'; +import { bold } from '../../lib/common/util/Format.js'; import { BushListener } from '../../lib/extensions/discord-akairo/BushListener.js'; export default class CommandErrorListener extends BushListener { @@ -163,11 +164,9 @@ export default class CommandErrorListener extends BushListener { if (options.type === 'command-dev' || options.type === 'command-log') embeds[0].setTitle(`${options.isSlash ? 'Slash ' : ''}CommandError #${format.input(`${options.errorNum}`)}`); else if (options.type === 'uncaughtException') - embeds[0].setTitle(`${options.context ? `[${Formatters.bold(options.context)}] An Error Occurred` : 'Uncaught Exception'}`); + embeds[0].setTitle(`${options.context ? `[${bold(options.context)}] An Error Occurred` : 'Uncaught Exception'}`); else if (options.type === 'unhandledRejection') - embeds[0].setTitle( - `${options.context ? `[${Formatters.bold(options.context)}] An Error Occurred` : 'Unhandled Promise Rejection'}` - ); + embeds[0].setTitle(`${options.context ? `[${bold(options.context)}] An Error Occurred` : 'Unhandled Promise Rejection'}`); return embeds; } |
