From 4a4f24bb8f85a66cf8e49aec68877b41e26c7046 Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Wed, 14 Aug 2024 15:46:27 -0400 Subject: [PATCH] fix(aurora): don't continue banning someone if they're already banned --- aurora/aurora.py | 2 +- aurora/models/moderation_types.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/aurora/aurora.py b/aurora/aurora.py index c8c22fb..704f3f9 100644 --- a/aurora/aurora.py +++ b/aurora/aurora.py @@ -46,7 +46,7 @@ class Aurora(commands.Cog): This cog stores all of its data in an SQLite database.""" __author__ = ["Seaswimmer"] - __version__ = "3.0.0-indev16" + __version__ = "3.0.0-indev17" __documentation__ = "https://seacogs.coastalcommits.com/aurora/" async def red_delete_data_for_user(self, *, requester, user_id: int): diff --git a/aurora/models/moderation_types.py b/aurora/models/moderation_types.py index afc14d0..272ec75 100644 --- a/aurora/models/moderation_types.py +++ b/aurora/models/moderation_types.py @@ -751,6 +751,7 @@ class Ban(Type): try: await ctx.guild.fetch_ban(target) await ctx.send(content=error(f"{target.mention} is already {cls.verb}!"), ephemeral=True) + return except NotFound: pass @@ -834,6 +835,7 @@ class Tempban(Ban): try: await ctx.guild.fetch_ban(target) await ctx.send(content=error(f"{target.mention} is already {Ban.verb}!"), ephemeral=True) + return except NotFound: pass