From d600a10729aa0f5ecd11e6709d90ff553a0b7a2b Mon Sep 17 00:00:00 2001 From: cswimr Date: Sat, 24 Aug 2024 19:13:01 -0400 Subject: [PATCH] fix(aurora): don't try and use the attribute of a Member object when the object is a User object --- aurora/aurora.py | 2 +- aurora/utilities/utils.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/aurora/aurora.py b/aurora/aurora.py index 1d13b98..0b5098c 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__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] - __version__ = "3.0.0-indev24" + __version__ = "3.0.0-indev25" __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" __documentation__ = "https://seacogs.coastalcommits.com/aurora/" diff --git a/aurora/utilities/utils.py b/aurora/utilities/utils.py index 9c97a3b..c0cac6f 100644 --- a/aurora/utilities/utils.py +++ b/aurora/utilities/utils.py @@ -84,12 +84,6 @@ async def check_moddable( ) 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 ctx.author.top_role <= target.top_role and await config.guild(ctx.guild).respect_hierarchy() is True: await ctx.send( @@ -100,6 +94,12 @@ async def check_moddable( ) return False + if target.guild_permissions.administrator: + await ctx.send( + content="You cannot moderate members with the Administrator permission!", ephemeral=True + ) + return False + if ( ctx.guild.get_member(ctx.bot.user.id).top_role <= target.top_role