fix(aurora): don't continue banning someone if they're already banned
All checks were successful
Actions / Build Documentation (MkDocs) (pull_request) Successful in 28s
Actions / Lint Code (Ruff & Pylint) (pull_request) Successful in 39s

This commit is contained in:
Seaswimmer 2024-08-14 15:46:27 -04:00
parent 9ae7607015
commit 4a4f24bb8f
Signed by: cswimr
GPG key ID: 3813315477F26F82
2 changed files with 3 additions and 1 deletions

View file

@ -46,7 +46,7 @@ class Aurora(commands.Cog):
This cog stores all of its data in an SQLite database.""" This cog stores all of its data in an SQLite database."""
__author__ = ["Seaswimmer"] __author__ = ["Seaswimmer"]
__version__ = "3.0.0-indev16" __version__ = "3.0.0-indev17"
__documentation__ = "https://seacogs.coastalcommits.com/aurora/" __documentation__ = "https://seacogs.coastalcommits.com/aurora/"
async def red_delete_data_for_user(self, *, requester, user_id: int): async def red_delete_data_for_user(self, *, requester, user_id: int):

View file

@ -751,6 +751,7 @@ class Ban(Type):
try: try:
await ctx.guild.fetch_ban(target) await ctx.guild.fetch_ban(target)
await ctx.send(content=error(f"{target.mention} is already {cls.verb}!"), ephemeral=True) await ctx.send(content=error(f"{target.mention} is already {cls.verb}!"), ephemeral=True)
return
except NotFound: except NotFound:
pass pass
@ -834,6 +835,7 @@ class Tempban(Ban):
try: try:
await ctx.guild.fetch_ban(target) await ctx.guild.fetch_ban(target)
await ctx.send(content=error(f"{target.mention} is already {Ban.verb}!"), ephemeral=True) await ctx.send(content=error(f"{target.mention} is already {Ban.verb}!"), ephemeral=True)
return
except NotFound: except NotFound:
pass pass