WIP: Refactor Aurora (3.0.0) #29

Draft
cswimr wants to merge 347 commits from aurora-pydantic into main
2 changed files with 7 additions and 7 deletions
Showing only changes of commit d600a10729 - Show all commits

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__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"]
__version__ = "3.0.0-indev24" __version__ = "3.0.0-indev25"
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
__documentation__ = "https://seacogs.coastalcommits.com/aurora/" __documentation__ = "https://seacogs.coastalcommits.com/aurora/"

View file

@ -84,12 +84,6 @@ async def check_moddable(
) )
return False return False
if target.guild_permissions.administrator:
await ctx.send(
content="You cannot moderate members with the Administrator permission!", ephemeral=True
)
return False
if isinstance(target, Member): if isinstance(target, Member):
if ctx.author.top_role <= target.top_role and await config.guild(ctx.guild).respect_hierarchy() is True: if ctx.author.top_role <= target.top_role and await config.guild(ctx.guild).respect_hierarchy() is True:
await ctx.send( await ctx.send(
@ -100,6 +94,12 @@ async def check_moddable(
) )
return False return False
if target.guild_permissions.administrator:
await ctx.send(
content="You cannot moderate members with the Administrator permission!", ephemeral=True
)
return False
if ( if (
ctx.guild.get_member(ctx.bot.user.id).top_role ctx.guild.get_member(ctx.bot.user.id).top_role
<= target.top_role <= target.top_role