diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-12-26 17:16:32 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-12-26 17:16:32 -0500 |
commit | fc390ffc300334c396d9d06b0feaf8fbc6ed2814 (patch) | |
tree | a6282a74cf99033291ac7bc9de123ae273d528d2 /src/listeners/commands | |
parent | 062435590980b87f5b054418ed88604e26358ae9 (diff) | |
download | tanzanite-fc390ffc300334c396d9d06b0feaf8fbc6ed2814.tar.gz tanzanite-fc390ffc300334c396d9d06b0feaf8fbc6ed2814.tar.bz2 tanzanite-fc390ffc300334c396d9d06b0feaf8fbc6ed2814.zip |
documentation, bug fixes etc
Diffstat (limited to 'src/listeners/commands')
-rw-r--r-- | src/listeners/commands/commandError.ts | 8 | ||||
-rw-r--r-- | src/listeners/commands/commandStarted.ts | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index c005574..f26ff7f 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 { Command, type AkairoMessage, type GuildTextBasedChannels } from 'discord-akairo'; -import { Formatters, MessageEmbed, type DMChannel, type Message } from 'discord.js'; +import { Command, type AkairoMessage } from 'discord-akairo'; +import { Formatters, GuildTextBasedChannel, MessageEmbed, type DMChannel, type Message } from 'discord.js'; import { BushListener } from '../../lib/extensions/discord-akairo/BushListener.js'; export default class CommandErrorListener extends BushListener { @@ -24,7 +24,7 @@ export default class CommandErrorListener extends BushListener { const channel = message.channel?.type === 'DM' ? (message.channel as DMChannel)!.recipient.tag - : (message.channel as GuildTextBasedChannels)!.name; + : (message.channel as GuildTextBasedChannel)!.name; const command = _command ?? message.util?.parsed?.command; client.sentry.captureException(error, { @@ -38,7 +38,7 @@ export default class CommandErrorListener extends BushListener { 'channel.id': message.channel!.type === 'DM' ? (message.channel as DMChannel)!.recipient.id - : (message.channel as GuildTextBasedChannels)!.id, + : (message.channel as GuildTextBasedChannel)!.id, 'channel.name': channel, 'guild.id': message.guild?.id, 'guild.name': message.guild?.name, diff --git a/src/listeners/commands/commandStarted.ts b/src/listeners/commands/commandStarted.ts index afc689d..76974c8 100644 --- a/src/listeners/commands/commandStarted.ts +++ b/src/listeners/commands/commandStarted.ts @@ -1,7 +1,6 @@ import { BushListener, type BushCommandHandlerEvents } from '#lib'; import { Severity } from '@sentry/types'; -import { type GuildTextBasedChannels } from 'discord-akairo'; -import { type DMChannel } from 'discord.js'; +import { GuildTextBasedChannel, type DMChannel } from 'discord.js'; export default class CommandStartedListener extends BushListener { public constructor() { @@ -25,11 +24,11 @@ export default class CommandStartedListener extends BushListener { 'channel.id': message.channel!.type === 'DM' ? (message.channel as DMChannel)!.recipient.id - : (message.channel as GuildTextBasedChannels)!.id, + : (message.channel as GuildTextBasedChannel)!.id, 'channel.name': message.channel!.type === 'DM' ? (message.channel as DMChannel)!.recipient.tag - : (message.channel as GuildTextBasedChannels)!.name, + : (message.channel as GuildTextBasedChannel)!.name, 'guild.id': message.guild?.id, 'guild.name': message.guild?.name, 'environment': client.config.environment |