From fc390ffc300334c396d9d06b0feaf8fbc6ed2814 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 26 Dec 2021 17:16:32 -0500 Subject: documentation, bug fixes etc --- src/listeners/commands/commandError.ts | 8 ++++---- src/listeners/commands/commandStarted.ts | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src/listeners/commands') 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 -- cgit