diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-25 23:47:40 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-25 23:47:40 -0500 |
commit | 840cca672d681c36f980a06fb79a4e2c01bd69ac (patch) | |
tree | 82c40a7fe3e1a2bc6367fed6e3d26b6c7dceb256 /src/listeners/commands | |
parent | 6ca99336a416389dd2b0b8c4c6a7b2ef87bc9fef (diff) | |
download | tanzanite-840cca672d681c36f980a06fb79a4e2c01bd69ac.tar.gz tanzanite-840cca672d681c36f980a06fb79a4e2c01bd69ac.tar.bz2 tanzanite-840cca672d681c36f980a06fb79a4e2c01bd69ac.zip |
I love breaking changes!!!!
Diffstat (limited to 'src/listeners/commands')
-rw-r--r-- | src/listeners/commands/commandBlocked.ts | 4 | ||||
-rw-r--r-- | src/listeners/commands/commandError.ts | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/listeners/commands/commandBlocked.ts b/src/listeners/commands/commandBlocked.ts index 2dfe4cd..c80b99a 100644 --- a/src/listeners/commands/commandBlocked.ts +++ b/src/listeners/commands/commandBlocked.ts @@ -116,7 +116,9 @@ export default class CommandBlockedListener extends BushListener { // some inhibitors do not have message.util yet function respond(content: string | MessagePayload | ReplyMessageOptions | InteractionReplyOptions) { - return message.util ? message.util.reply(content) : message.reply(content); + return message.util + ? message.util.reply(<string | MessagePayload | ReplyMessageOptions>content) + : message.reply(<string | MessagePayload | (ReplyMessageOptions & InteractionReplyOptions)>content); } } } diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index 44d20a4..bd1ae7d 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -1,7 +1,7 @@ import { type BushCommandHandlerEvents } from '#lib'; import { Severity } from '@sentry/types'; import { type AkairoMessage, type Command } from 'discord-akairo'; -import { Formatters, GuildTextBasedChannel, MessageEmbed, type Message } from 'discord.js'; +import { Embed, Formatters, GuildTextBasedChannel, type Message } from 'discord.js'; import { BushListener } from '../../lib/extensions/discord-akairo/BushListener.js'; export default class CommandErrorListener extends BushListener { @@ -90,7 +90,7 @@ export default class CommandErrorListener extends BushListener { channel?: string; } | { error: Error | any; type: 'uncaughtException' | 'unhandledRejection'; context?: string } - ): Promise<MessageEmbed> { + ): Promise<Embed> { const _haste = CommandErrorListener.getErrorHaste(options.error); const _stack = CommandErrorListener.getErrorStack(options.error); const [haste, stack] = await Promise.all([_haste, _stack]); @@ -118,8 +118,8 @@ export default class CommandErrorListener extends BushListener { haste: string[]; stack: string; } - ): MessageEmbed { - const embed = new MessageEmbed().setColor(util.colors.error).setTimestamp(); + ): Embed { + const embed = new Embed().setColor(util.colors.error).setTimestamp(); if (options.type === 'command-user') { return embed .setTitle('An Error Occurred') @@ -143,7 +143,7 @@ export default class CommandErrorListener extends BushListener { description.push(...options.haste); - embed.addField('Stack Trace', options.stack).setDescription(description.join('\n')); + embed.addField({ name: 'Stack Trace', value: options.stack }).setDescription(description.join('\n')); if (options.type === 'command-dev' || options.type === 'command-log') embed.setTitle(`${options.isSlash ? 'Slash ' : ''}CommandError #\`${options.errorNum}\``); |