From 85c9e01741c1c8e5c7a755605f2a39d26a3a4be8 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sat, 15 Jan 2022 18:20:34 -0500 Subject: don't ban users that are already banned --- src/lib/extensions/discord.js/BushGuild.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lib/extensions/discord.js/BushGuild.ts') diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts index 0011ce6..33ee3fc 100644 --- a/src/lib/extensions/discord.js/BushGuild.ts +++ b/src/lib/extensions/discord.js/BushGuild.ts @@ -163,6 +163,8 @@ export class BushGuild extends Guild { const user = (await util.resolveNonCachedUser(options.user))!; const moderator = client.users.resolve(options.moderator ?? client.user!)!; + if ((await this.bans.fetch()).has(user.id)) return banResponse.ALREADY_BANNED; + const ret = await (async () => { // dm user dmSuccessEvent = await Moderation.punishDM({ -- cgit