diff options
Diffstat (limited to 'src/listeners/bush')
-rw-r--r-- | src/listeners/bush/appealListener.ts | 10 | ||||
-rw-r--r-- | src/listeners/bush/joinAutoBan.ts | 10 | ||||
-rw-r--r-- | src/listeners/bush/supportThread.ts | 10 | ||||
-rw-r--r-- | src/listeners/bush/userUpdateAutoBan.ts | 8 |
4 files changed, 19 insertions, 19 deletions
diff --git a/src/listeners/bush/appealListener.ts b/src/listeners/bush/appealListener.ts index ecc65c5..46859d1 100644 --- a/src/listeners/bush/appealListener.ts +++ b/src/listeners/bush/appealListener.ts @@ -1,18 +1,18 @@ -import { BotListener, colors, mappings, ModLog, type BotClientEvents } from '#lib'; +import { BotListener, colors, Emitter, mappings, ModLog, type BotClientEvents } from '#lib'; import assert from 'assert/strict'; -import { EmbedBuilder } from 'discord.js'; +import { EmbedBuilder, Events } from 'discord.js'; import UserInfoCommand from '../../commands/info/userInfo.js'; import ModlogCommand from '../../commands/moderation/modlog.js'; export default class AppealListener extends BotListener { public constructor() { super('appealListener', { - emitter: 'client', - event: 'messageCreate' + emitter: Emitter.Client, + event: Events.MessageCreate }); } - public async exec(...[message]: BotClientEvents['messageCreate']): Promise<any> { + public async exec(...[message]: BotClientEvents[Events.MessageCreate]): Promise<any> { if (!this.client.config.isProduction || !message.inGuild() || message.guildId !== mappings.guilds["Moulberry's Bush"]) return; if (message.author.id !== '855446927688335370' || message.embeds.length < 1) return; diff --git a/src/listeners/bush/joinAutoBan.ts b/src/listeners/bush/joinAutoBan.ts index 66fdf54..706491f 100644 --- a/src/listeners/bush/joinAutoBan.ts +++ b/src/listeners/bush/joinAutoBan.ts @@ -1,15 +1,15 @@ -import { AllowedMentions, BotListener, colors, emojis, format, mappings, type BotClientEvents } from '#lib'; -import { TextChannel } from 'discord.js'; +import { AllowedMentions, BotListener, colors, Emitter, emojis, format, mappings, type BotClientEvents } from '#lib'; +import { Events, TextChannel } from 'discord.js'; export default class JoinAutoBanListener extends BotListener { public constructor() { super('joinAutoBan', { - emitter: 'client', - event: 'guildMemberAdd' + emitter: Emitter.Client, + event: Events.GuildMemberAdd }); } - public async exec(...[member]: BotClientEvents['guildMemberAdd']): Promise<void> { + public async exec(...[member]: BotClientEvents[Events.GuildMemberAdd]): Promise<void> { if (!this.client.config.isProduction) return; if (member.guild.id !== mappings.guilds["Moulberry's Bush"]) return; const guild = member.guild; diff --git a/src/listeners/bush/supportThread.ts b/src/listeners/bush/supportThread.ts index 3e806e2..ea39f3b 100644 --- a/src/listeners/bush/supportThread.ts +++ b/src/listeners/bush/supportThread.ts @@ -1,17 +1,17 @@ -import { BotListener, colors, mappings, type BotClientEvents } from '#lib'; +import { BotListener, colors, Emitter, mappings, type BotClientEvents } from '#lib'; import { stripIndent } from '#tags'; import assert from 'assert/strict'; -import { EmbedBuilder, MessageType, PermissionFlagsBits, TextChannel } from 'discord.js'; +import { EmbedBuilder, Events, MessageType, PermissionFlagsBits, TextChannel } from 'discord.js'; export default class SupportThreadListener extends BotListener { public constructor() { super('supportThread', { - emitter: 'client', - event: 'messageCreate' + emitter: Emitter.Client, + event: Events.MessageCreate }); } - public async exec(...[message]: BotClientEvents['messageCreate']): Promise<void | undefined> { + public async exec(...[message]: BotClientEvents[Events.MessageCreate]): Promise<void | undefined> { if (!this.client.config.isProduction || !message.inGuild()) return; if (![MessageType.Default, MessageType.Reply].includes(message.type)) return; if (message.thread) return; diff --git a/src/listeners/bush/userUpdateAutoBan.ts b/src/listeners/bush/userUpdateAutoBan.ts index ae8bca3..e39f8da 100644 --- a/src/listeners/bush/userUpdateAutoBan.ts +++ b/src/listeners/bush/userUpdateAutoBan.ts @@ -1,11 +1,11 @@ -import { AllowedMentions, BotListener, colors, emojis, format, mappings, type BotClientEvents } from '#lib'; -import { GuildMember, type TextChannel } from 'discord.js'; +import { AllowedMentions, BotListener, colors, Emitter, emojis, format, mappings, type BotClientEvents } from '#lib'; +import { Events, GuildMember, type TextChannel } from 'discord.js'; export default class UserUpdateAutoBanListener extends BotListener { public constructor() { super('userUpdateAutoBan', { - emitter: 'client', - event: 'userUpdate' + emitter: Emitter.Client, + event: Events.UserUpdate }); } |