diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-28 21:51:17 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-08-28 21:51:17 -0400 |
commit | 14eb0e617b084080c4cffc5b781b311c65c5f928 (patch) | |
tree | 9aaf1734c1e739814a913afeda40c56b0f84df61 /src/listeners/bush | |
parent | 03b26d5f00422f3aaddce3db2186765863b1eca0 (diff) | |
download | tanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.tar.gz tanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.tar.bz2 tanzanite-14eb0e617b084080c4cffc5b781b311c65c5f928.zip |
rebrand v3
Diffstat (limited to 'src/listeners/bush')
-rw-r--r-- | src/listeners/bush/appealListener.ts | 9 | ||||
-rw-r--r-- | src/listeners/bush/joinAutoBan.ts | 11 | ||||
-rw-r--r-- | src/listeners/bush/supportThread.ts | 9 | ||||
-rw-r--r-- | src/listeners/bush/userUpdateAutoBan.ts | 11 |
4 files changed, 18 insertions, 22 deletions
diff --git a/src/listeners/bush/appealListener.ts b/src/listeners/bush/appealListener.ts index a4e1f00..ecc65c5 100644 --- a/src/listeners/bush/appealListener.ts +++ b/src/listeners/bush/appealListener.ts @@ -1,19 +1,18 @@ -import { BushListener, colors, mappings, ModLog, type BushClientEvents } from '#lib'; +import { BotListener, colors, mappings, ModLog, type BotClientEvents } from '#lib'; import assert from 'assert/strict'; import { EmbedBuilder } from 'discord.js'; import UserInfoCommand from '../../commands/info/userInfo.js'; import ModlogCommand from '../../commands/moderation/modlog.js'; -export default class AppealListener extends BushListener { +export default class AppealListener extends BotListener { public constructor() { super('appealListener', { emitter: 'client', - event: 'messageCreate', - category: 'bush' + event: 'messageCreate' }); } - public async exec(...[message]: BushClientEvents['messageCreate']): Promise<any> { + public async exec(...[message]: BotClientEvents['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 4370e86..66fdf54 100644 --- a/src/listeners/bush/joinAutoBan.ts +++ b/src/listeners/bush/joinAutoBan.ts @@ -1,16 +1,15 @@ -import { AllowedMentions, BushListener, colors, emojis, format, mappings, type BushClientEvents } from '#lib'; +import { AllowedMentions, BotListener, colors, emojis, format, mappings, type BotClientEvents } from '#lib'; import { TextChannel } from 'discord.js'; -export default class JoinAutoBanListener extends BushListener { +export default class JoinAutoBanListener extends BotListener { public constructor() { super('joinAutoBan', { emitter: 'client', - event: 'guildMemberAdd', - category: 'bush' + event: 'guildMemberAdd' }); } - public async exec(...[member]: BushClientEvents['guildMemberAdd']): Promise<void> { + public async exec(...[member]: BotClientEvents['guildMemberAdd']): Promise<void> { if (!this.client.config.isProduction) return; if (member.guild.id !== mappings.guilds["Moulberry's Bush"]) return; const guild = member.guild; @@ -20,7 +19,7 @@ export default class JoinAutoBanListener extends BushListener { const code = this.client.utils.getShared('autoBanCode'); if (!code) return; if (eval(code)) { - const res = await member.bushBan({ + const res = await member.customBan({ reason: '[AutoBan] Impersonation is not allowed.', moderator: member.guild.members.me! }); diff --git a/src/listeners/bush/supportThread.ts b/src/listeners/bush/supportThread.ts index 5145ff2..3e806e2 100644 --- a/src/listeners/bush/supportThread.ts +++ b/src/listeners/bush/supportThread.ts @@ -1,18 +1,17 @@ -import { BushListener, colors, mappings, type BushClientEvents } from '#lib'; +import { BotListener, colors, mappings, type BotClientEvents } from '#lib'; import { stripIndent } from '#tags'; import assert from 'assert/strict'; import { EmbedBuilder, MessageType, PermissionFlagsBits, TextChannel } from 'discord.js'; -export default class SupportThreadListener extends BushListener { +export default class SupportThreadListener extends BotListener { public constructor() { super('supportThread', { emitter: 'client', - event: 'messageCreate', - category: 'bush' + event: 'messageCreate' }); } - public async exec(...[message]: BushClientEvents['messageCreate']): Promise<void | undefined> { + public async exec(...[message]: BotClientEvents['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 adfb80c..ae8bca3 100644 --- a/src/listeners/bush/userUpdateAutoBan.ts +++ b/src/listeners/bush/userUpdateAutoBan.ts @@ -1,16 +1,15 @@ -import { AllowedMentions, BushListener, colors, emojis, format, mappings, type BushClientEvents } from '#lib'; +import { AllowedMentions, BotListener, colors, emojis, format, mappings, type BotClientEvents } from '#lib'; import { GuildMember, type TextChannel } from 'discord.js'; -export default class UserUpdateAutoBanListener extends BushListener { +export default class UserUpdateAutoBanListener extends BotListener { public constructor() { super('userUpdateAutoBan', { emitter: 'client', - event: 'userUpdate', - category: 'bush' + event: 'userUpdate' }); } - public async exec(...[_oldUser, newUser]: BushClientEvents['userUpdate']): Promise<void> { + public async exec(...[_oldUser, newUser]: BotClientEvents['userUpdate']): Promise<void> { if (!this.client.config.isProduction) return; // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -26,7 +25,7 @@ export default class UserUpdateAutoBanListener extends BushListener { const guild = member.guild; - const res = await member.bushBan({ + const res = await member.customBan({ reason: '[AutoBan] Impersonation is not allowed.', moderator: member.guild.members.me! }); |