diff options
Diffstat (limited to 'src/listeners')
-rw-r--r-- | src/listeners/client/interaction.ts | 2 | ||||
-rw-r--r-- | src/listeners/client/ready.ts | 12 | ||||
-rw-r--r-- | src/listeners/commands/commandBlocked.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/commandError.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/commandMissingPermissions.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/commandStarted.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/slashBlocked.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/slashCommandError.ts | 8 | ||||
-rw-r--r-- | src/listeners/commands/slashMissingPermissions.ts | 2 | ||||
-rw-r--r-- | src/listeners/commands/slashStarted.ts | 4 | ||||
-rw-r--r-- | src/listeners/guild/syncUnban.ts | 2 | ||||
-rw-r--r-- | src/listeners/message/level.ts | 2 | ||||
-rw-r--r-- | src/listeners/other/consoleListener.ts | 4 | ||||
-rw-r--r-- | src/listeners/other/promiseRejection.ts | 2 |
14 files changed, 19 insertions, 29 deletions
diff --git a/src/listeners/client/interaction.ts b/src/listeners/client/interaction.ts index d7d8776..c848d15 100644 --- a/src/listeners/client/interaction.ts +++ b/src/listeners/client/interaction.ts @@ -1,5 +1,5 @@ +import { BushListener } from '@lib'; import { ButtonInteraction, CommandInteraction, Interaction, SelectMenuInteraction } from 'discord.js'; -import { BushListener } from '../../lib'; export default class InteractionListener extends BushListener { public constructor() { diff --git a/src/listeners/client/ready.ts b/src/listeners/client/ready.ts index d6e5f2f..c3d9b45 100644 --- a/src/listeners/client/ready.ts +++ b/src/listeners/client/ready.ts @@ -1,5 +1,5 @@ +import { BushListener } from '@lib'; import chalk from 'chalk'; -import { BushListener } from '../../lib'; export default class ReadyListener extends BushListener { public constructor() { @@ -20,15 +20,5 @@ export default class ReadyListener extends BushListener { `------------------------------------------------------------------------------${this.client.config.dev ? '---' : ''}` ) ); - - this.client.user.setPresence({ - activities: [ - { - name: 'Beep Boop', - type: 'WATCHING' - } - ], - status: 'online' - }); } } diff --git a/src/listeners/commands/commandBlocked.ts b/src/listeners/commands/commandBlocked.ts index aebc05d..03050c2 100644 --- a/src/listeners/commands/commandBlocked.ts +++ b/src/listeners/commands/commandBlocked.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushListener, BushMessage } from '../../lib'; +import { BushCommand, BushListener, BushMessage } from '@lib'; export default class CommandBlockedListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index 36a482d..9d51ea8 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -1,7 +1,7 @@ +import { BushListener, BushMessage } from '@lib'; import { stripIndents } from 'common-tags'; import { Command } from 'discord-akairo'; import { MessageEmbed } from 'discord.js'; -import { BushListener, BushMessage } from '../../lib'; export default class CommandErrorListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/commandMissingPermissions.ts b/src/listeners/commands/commandMissingPermissions.ts index 7f04304..ffcc408 100644 --- a/src/listeners/commands/commandMissingPermissions.ts +++ b/src/listeners/commands/commandMissingPermissions.ts @@ -1,5 +1,5 @@ +import { BushCommand, BushListener, BushMessage } from '@lib'; import { PermissionString } from 'discord.js'; -import { BushCommand, BushListener, BushMessage } from '../../lib'; export default class CommandMissingPermissionsListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/commandStarted.ts b/src/listeners/commands/commandStarted.ts index ba1af42..24bb041 100644 --- a/src/listeners/commands/commandStarted.ts +++ b/src/listeners/commands/commandStarted.ts @@ -1,5 +1,5 @@ +import { BushCommand, BushListener } from '@lib'; import { Message } from 'discord.js'; -import { BushCommand, BushListener } from '../../lib'; export default class CommandStartedListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/slashBlocked.ts b/src/listeners/commands/slashBlocked.ts index a2e4b0e..bf98734 100644 --- a/src/listeners/commands/slashBlocked.ts +++ b/src/listeners/commands/slashBlocked.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushListener, BushSlashMessage } from '../../lib'; +import { BushCommand, BushListener, BushSlashMessage } from '@lib'; export default class SlashBlockedListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/slashCommandError.ts b/src/listeners/commands/slashCommandError.ts index 1fa9dfa..9bf5f6a 100644 --- a/src/listeners/commands/slashCommandError.ts +++ b/src/listeners/commands/slashCommandError.ts @@ -1,6 +1,6 @@ +import { BushCommand, BushListener, BushSlashMessage } from '@lib'; import { stripIndents } from 'common-tags'; -import { MessageEmbed } from 'discord.js'; -import { BushCommand, BushListener, BushSlashMessage } from '../../lib'; +import { GuildChannel, MessageEmbed } from 'discord.js'; export default class SlashCommandErrorListener extends BushListener { public constructor() { @@ -25,7 +25,7 @@ export default class SlashCommandErrorListener extends BushListener { await this.client.logger.channelError({ embeds: [errorEmbed] }); if (message) { - const channel = message.channel?.name || message.interaction.user.tag; + const channel = (message.channel as GuildChannel)?.name || message.interaction.user.tag; if (!this.client.config.owners.includes(message.author.id)) { const errorUserEmbed: MessageEmbed = new MessageEmbed() .setTitle('A Slash Command Error Occurred') @@ -51,7 +51,7 @@ export default class SlashCommandErrorListener extends BushListener { }); } } - const channel = message.channel?.name || message.interaction.user.tag; + const channel = (message.channel as GuildChannel)?.name || message.interaction.user.tag; this.client.console.error( 'SlashError', `an error occurred with the <<${command}>> command in <<${channel}>> triggered by <<${message?.author?.tag}>>:\n` + diff --git a/src/listeners/commands/slashMissingPermissions.ts b/src/listeners/commands/slashMissingPermissions.ts index 85cb5dd..a410bef 100644 --- a/src/listeners/commands/slashMissingPermissions.ts +++ b/src/listeners/commands/slashMissingPermissions.ts @@ -1,6 +1,6 @@ +import { BushListener } from '@lib'; import { Command } from 'discord-akairo'; import { CommandInteraction } from 'discord.js'; -import { BushListener } from '../../lib'; export default class SlashMissingPermissionsListener extends BushListener { public constructor() { diff --git a/src/listeners/commands/slashStarted.ts b/src/listeners/commands/slashStarted.ts index c6a6351..a0201c5 100644 --- a/src/listeners/commands/slashStarted.ts +++ b/src/listeners/commands/slashStarted.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushListener, BushSlashMessage } from '../../lib'; +import { BushCommand, BushListener, BushSlashMessage } from '@lib'; export default class SlashStartedListener extends BushListener { public constructor() { @@ -11,7 +11,7 @@ export default class SlashStartedListener extends BushListener { this.client.logger.info( 'SlashCommand', `The <<${command.id}>> command was used by <<${message.author.tag}>> in ${ - !message.channel ? `their <<DMs>>` : `<<#${message.channel.name}>> in <<${message.guild?.name}>>` + message.channel.type === 'DM' ? `their <<DMs>>` : `<<#${message.channel.name}>> in <<${message.guild?.name}>>` }.`, true //// I don't want to spam the log channel when people use commands ); diff --git a/src/listeners/guild/syncUnban.ts b/src/listeners/guild/syncUnban.ts index 2729ae7..aa148f9 100644 --- a/src/listeners/guild/syncUnban.ts +++ b/src/listeners/guild/syncUnban.ts @@ -1,5 +1,5 @@ +import { Ban, BushListener } from '@lib'; import { Guild, User } from 'discord.js'; -import { Ban, BushListener } from '../../lib'; export default class SyncUnbanListener extends BushListener { public constructor() { diff --git a/src/listeners/message/level.ts b/src/listeners/message/level.ts index 1a24e1b..ab78c77 100644 --- a/src/listeners/message/level.ts +++ b/src/listeners/message/level.ts @@ -1,5 +1,5 @@ +import { BushListener, Level } from '@lib'; import { Message } from 'discord.js'; -import { BushListener, Level } from '../../lib'; export default class LevelListener extends BushListener { private levelCooldowns: Set<string> = new Set(); diff --git a/src/listeners/other/consoleListener.ts b/src/listeners/other/consoleListener.ts index d1915f1..ef1efd5 100644 --- a/src/listeners/other/consoleListener.ts +++ b/src/listeners/other/consoleListener.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { BushListener } from '../../lib'; +import { BushListener } from '@lib'; export default class ConsoleListener extends BushListener { public constructor() { @@ -15,7 +15,7 @@ export default class ConsoleListener extends BushListener { const bot = this.client, config = this.client.config, client = this.client, - { Ban, Global, Guild, Level, ModLog, StickyRole } = await import('../../lib'), + { Ban, Global, Guild, Level, ModLog, StickyRole } = await import('@lib'), { ButtonInteraction, Collector, diff --git a/src/listeners/other/promiseRejection.ts b/src/listeners/other/promiseRejection.ts index 883197a..460d849 100644 --- a/src/listeners/other/promiseRejection.ts +++ b/src/listeners/other/promiseRejection.ts @@ -1,4 +1,4 @@ -import { BushListener } from '../../lib'; +import { BushListener } from '@lib'; export default class PromiseRejectionListener extends BushListener { public constructor() { |