fix(aurora): don't try and use the attribute of a Member object when the object is a User object
This commit is contained in:
parent
5934506c8a
commit
d600a10729
2 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue