diff options
Diffstat (limited to 'src/listeners')
22 files changed, 24 insertions, 22 deletions
diff --git a/src/listeners/client/interactionCreate.ts b/src/listeners/client/interactionCreate.ts index b0d1786..17249a9 100644 --- a/src/listeners/client/interactionCreate.ts +++ b/src/listeners/client/interactionCreate.ts @@ -10,7 +10,7 @@ export default class InteractionCreateListener extends BushListener { }); } - async exec(...[interaction]: ClientEvents['interactionCreate']): Promise<unknown> { + public override async exec(...[interaction]: ClientEvents['interactionCreate']): Promise<unknown> { if (!interaction) return; if (interaction.isCommand()) { void client.console.info( diff --git a/src/listeners/client/ready.ts b/src/listeners/client/ready.ts index 449ec42..39e583b 100644 --- a/src/listeners/client/ready.ts +++ b/src/listeners/client/ready.ts @@ -9,7 +9,7 @@ export default class ReadyListener extends BushListener { }); } - public async exec(): Promise<void> { + public override async exec(): Promise<void> { const tag = `<<${client.user.tag}>>`, guildCount = `<<${client.guilds.cache.size.toLocaleString()}>>`, userCount = `<<${client.users.cache.size.toLocaleString()}>>`; diff --git a/src/listeners/commands/commandBlocked.ts b/src/listeners/commands/commandBlocked.ts index 095ce58..5d6bcfb 100644 --- a/src/listeners/commands/commandBlocked.ts +++ b/src/listeners/commands/commandBlocked.ts @@ -8,7 +8,7 @@ export default class CommandBlockedListener extends BushListener { }); } - public async exec(...[message, command, reason]: BushCommandHandlerEvents['commandBlocked']): Promise<unknown> { + public override async exec(...[message, command, reason]: BushCommandHandlerEvents['commandBlocked']): Promise<unknown> { return await CommandBlockedListener.handleBlocked(message, command, reason); } diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index 0525fe6..22ed0c6 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -9,7 +9,7 @@ export default class CommandErrorListener extends BushListener { }); } - public async exec(...[error, message, command]: BushCommandHandlerEvents['error']): Promise<unknown> { + public override async exec(...[error, message, command]: BushCommandHandlerEvents['error']): Promise<unknown> { return await CommandErrorListener.handleError(error, message, command); } diff --git a/src/listeners/commands/commandMissingPermissions.ts b/src/listeners/commands/commandMissingPermissions.ts index 70adcd1..fdca5d3 100644 --- a/src/listeners/commands/commandMissingPermissions.ts +++ b/src/listeners/commands/commandMissingPermissions.ts @@ -9,7 +9,9 @@ export default class CommandMissingPermissionsListener extends BushListener { }); } - public async exec(...[message, command, type, missing]: BushCommandHandlerEvents['missingPermissions']): Promise<unknown> { + public override async exec( + ...[message, command, type, missing]: BushCommandHandlerEvents['missingPermissions'] + ): Promise<unknown> { return await CommandMissingPermissionsListener.handleMissing(message, command, type, missing); } diff --git a/src/listeners/commands/commandStarted.ts b/src/listeners/commands/commandStarted.ts index bccb500..8b9c7e1 100644 --- a/src/listeners/commands/commandStarted.ts +++ b/src/listeners/commands/commandStarted.ts @@ -8,7 +8,7 @@ export default class CommandStartedListener extends BushListener { category: 'commands' }); } - exec(...[message, command]: BushCommandHandlerEvents['commandStarted']): void { + public override exec(...[message, command]: BushCommandHandlerEvents['commandStarted']): void { void client.logger.info( 'Command', `The <<${command.id}>> command was used by <<${message.author.tag}>> in ${ diff --git a/src/listeners/commands/slashBlocked.ts b/src/listeners/commands/slashBlocked.ts index bdad2ea..851cb5e 100644 --- a/src/listeners/commands/slashBlocked.ts +++ b/src/listeners/commands/slashBlocked.ts @@ -10,7 +10,7 @@ export default class SlashBlockedListener extends BushListener { }); } - public async exec(...[message, command, reason]: BushCommandHandlerEvents['slashBlocked']): Promise<unknown> { + public override async exec(...[message, command, reason]: BushCommandHandlerEvents['slashBlocked']): Promise<unknown> { return await CommandBlockedListener.handleBlocked(message, command, reason); } } diff --git a/src/listeners/commands/slashCommandError.ts b/src/listeners/commands/slashCommandError.ts index 67febfd..5ab195f 100644 --- a/src/listeners/commands/slashCommandError.ts +++ b/src/listeners/commands/slashCommandError.ts @@ -9,7 +9,7 @@ export default class SlashCommandErrorListener extends BushListener { category: 'commands' }); } - async exec(...[error, message, command]: BushCommandHandlerEvents['slashError']): Promise<void> { + public override async exec(...[error, message, command]: BushCommandHandlerEvents['slashError']): Promise<void> { return await CommandErrorListener.handleError(error, message, command); } } diff --git a/src/listeners/commands/slashMissingPermissions.ts b/src/listeners/commands/slashMissingPermissions.ts index 07c63e9..a01b1fa 100644 --- a/src/listeners/commands/slashMissingPermissions.ts +++ b/src/listeners/commands/slashMissingPermissions.ts @@ -10,7 +10,7 @@ export default class SlashMissingPermissionsListener extends BushListener { }); } - public async exec( + public override async exec( ...[message, command, type, missing]: BushCommandHandlerEvents['slashMissingPermissions'] ): Promise<unknown> { return await CommandMissingPermissionsListener.handleMissing(message, command, type, missing); diff --git a/src/listeners/commands/slashStarted.ts b/src/listeners/commands/slashStarted.ts index dbb0c0d..e64df54 100644 --- a/src/listeners/commands/slashStarted.ts +++ b/src/listeners/commands/slashStarted.ts @@ -8,7 +8,7 @@ export default class SlashStartedListener extends BushListener { category: 'commands' }); } - async exec(...[message, command]: BushCommandHandlerEvents['slashStarted']): Promise<unknown> { + public override async exec(...[message, command]: BushCommandHandlerEvents['slashStarted']): Promise<unknown> { return void client.logger.info( 'SlashCommand', `The <<${command.id}>> command was used by <<${message.author.tag}>> in ${ diff --git a/src/listeners/guild/syncUnban.ts b/src/listeners/guild/syncUnban.ts index 00f260c..b1e4fd9 100644 --- a/src/listeners/guild/syncUnban.ts +++ b/src/listeners/guild/syncUnban.ts @@ -9,7 +9,7 @@ export default class SyncUnbanListener extends BushListener { }); } - public async exec(...[ban]: ClientEvents['guildBanRemove']): Promise<void> { + public override async exec(...[ban]: ClientEvents['guildBanRemove']): Promise<void> { const bans = await ActivePunishment.findAll({ where: { user: ban.user.id, diff --git a/src/listeners/message/autoPublisher.ts b/src/listeners/message/autoPublisher.ts index 3941371..a1d61f7 100644 --- a/src/listeners/message/autoPublisher.ts +++ b/src/listeners/message/autoPublisher.ts @@ -10,7 +10,7 @@ export default class autoPublisherListener extends BushListener { }); } - public async exec(...[message]: BushClientEvents['messageCreate']): Promise<void> { + public override async exec(...[message]: BushClientEvents['messageCreate']): Promise<void> { if (!message.guild) return; const autoPublishChannels = await message.guild.getSetting('autoPublishChannels'); if (autoPublishChannels) { diff --git a/src/listeners/message/automodCreate.ts b/src/listeners/message/automodCreate.ts index c2db29a..af9bb10 100644 --- a/src/listeners/message/automodCreate.ts +++ b/src/listeners/message/automodCreate.ts @@ -13,7 +13,7 @@ export default class AutomodMessageCreateListener extends BushListener { }); } - async exec(...[message]: BushClientEvents['messageCreate']): Promise<unknown> { + public override async exec(...[message]: BushClientEvents['messageCreate']): Promise<unknown> { return await AutomodMessageCreateListener.automod(message); } diff --git a/src/listeners/message/automodUpdate.ts b/src/listeners/message/automodUpdate.ts index 7b9e01a..2dd86a2 100644 --- a/src/listeners/message/automodUpdate.ts +++ b/src/listeners/message/automodUpdate.ts @@ -12,7 +12,7 @@ export default class AutomodMessageUpdateListener extends BushListener { } // eslint-disable-next-line @typescript-eslint/no-unused-vars - async exec(...[_, newMessage]: BushClientEvents['messageUpdate']): Promise<unknown> { + public override async exec(...[_, newMessage]: BushClientEvents['messageUpdate']): Promise<unknown> { const fullMessage = newMessage.partial ? await newMessage.fetch() : (newMessage as BushMessage); return await AutomodMessageCreateListener.automod(fullMessage); } diff --git a/src/listeners/message/blacklistedFile.ts b/src/listeners/message/blacklistedFile.ts index 93ed7b7..741b508 100644 --- a/src/listeners/message/blacklistedFile.ts +++ b/src/listeners/message/blacklistedFile.ts @@ -65,7 +65,7 @@ export default class BlacklistedFileListener extends BushListener { }); } - public async exec(...[message]: BushClientEvents['messageCreate']): Promise<void> { + public override async exec(...[message]: BushClientEvents['messageCreate']): Promise<void> { const guildWhitelist = [ client.consts.mappings.guilds.bush, client.consts.mappings.guilds.tree, diff --git a/src/listeners/message/booster.ts b/src/listeners/message/booster.ts index a042ad1..e57b8ea 100644 --- a/src/listeners/message/booster.ts +++ b/src/listeners/message/booster.ts @@ -10,7 +10,7 @@ export default class BoosterMessageListener extends BushListener { }); } - public async exec(...[message]: BushClientEvents['messageCreate']): Promise<unknown> { + public override async exec(...[message]: BushClientEvents['messageCreate']): Promise<unknown> { if (message.type === 'USER_PREMIUM_GUILD_SUBSCRIPTION' && message.guild.id === this.client.consts.mappings.guilds.bush) { return await message.react('<:nitroboost:785160348885975062>').catch(() => { void this.client.console.warn('BoosterMessage', `Failed to react to <<${message.id}>>.`); diff --git a/src/listeners/message/directMessage.ts b/src/listeners/message/directMessage.ts index 3dc84ab..55180b1 100644 --- a/src/listeners/message/directMessage.ts +++ b/src/listeners/message/directMessage.ts @@ -11,7 +11,7 @@ export default class DirectMessageListener extends BushListener { }); } - public async exec(...[message]: BushClientEvents['messageCreate']): Promise<void> { + public override async exec(...[message]: BushClientEvents['messageCreate']): Promise<void> { if (message.channel.type === 'DM') { if (!(message.author.id == this.client.user.id) && message.author.bot) return; const dmLogEmbed = new MessageEmbed().setTimestamp().setFooter(`User ID • ${message.author.id}`); diff --git a/src/listeners/message/level.ts b/src/listeners/message/level.ts index e8edfcf..db4be4b 100644 --- a/src/listeners/message/level.ts +++ b/src/listeners/message/level.ts @@ -11,7 +11,7 @@ export default class LevelListener extends BushListener { category: 'message' }); } - async exec(...[message]: BushCommandHandlerEvents['messageInvalid']): Promise<void> { + public override async exec(...[message]: BushCommandHandlerEvents['messageInvalid']): Promise<void> { if (message.author.bot) return; if (!message.author) return; if (!message.guild) return; diff --git a/src/listeners/message/verbose.ts b/src/listeners/message/verbose.ts index 45bf1de..632a22f 100644 --- a/src/listeners/message/verbose.ts +++ b/src/listeners/message/verbose.ts @@ -10,7 +10,7 @@ export default class MessageVerboseListener extends BushListener { }); } - public exec(...[message]: BushClientEvents['messageCreate']): Promise<void> { + public override exec(...[message]: BushClientEvents['messageCreate']): Promise<void> { if (message.channel?.type === 'DM') return; void this.client.console.verbose( 'Message', diff --git a/src/listeners/other/consoleListener.ts b/src/listeners/other/consoleListener.ts index 6d548ba..4b3a6bd 100644 --- a/src/listeners/other/consoleListener.ts +++ b/src/listeners/other/consoleListener.ts @@ -12,7 +12,7 @@ export default class ConsoleListener extends BushListener { }); } - public async exec(line: string): Promise<void> { + public override async exec(line: string): Promise<void> { if (line.startsWith('eval ') || line.startsWith('ev ')) { const sh = promisify(exec), bot = client, diff --git a/src/listeners/other/promiseRejection.ts b/src/listeners/other/promiseRejection.ts index e0a62c0..f2623c6 100644 --- a/src/listeners/other/promiseRejection.ts +++ b/src/listeners/other/promiseRejection.ts @@ -8,7 +8,7 @@ export default class PromiseRejectionListener extends BushListener { }); } - public async exec(error: Error): Promise<void> { + public override async exec(error: Error): Promise<void> { void client.console.error('PromiseRejection', `An unhanded promise rejection occurred:\n${error?.stack || error}`, false); void client.console.channelError({ embeds: [ diff --git a/src/listeners/other/uncaughtException.ts b/src/listeners/other/uncaughtException.ts index f1714f7..76afab9 100644 --- a/src/listeners/other/uncaughtException.ts +++ b/src/listeners/other/uncaughtException.ts @@ -8,7 +8,7 @@ export default class UncaughtExceptionListener extends BushListener { }); } - public async exec(error: Error): Promise<void> { + public override async exec(error: Error): Promise<void> { void client.console.error('uncaughtException', `An uncaught exception occurred:\n${error?.stack || error}`, false); void client.console.channelError({ embeds: [ |