fix(aurora): fixed a 403 forbidden error in some moderation type handlers when moderating someone with the administrator permission
This commit is contained in:
parent
29f393fa89
commit
b0509d748c
1 changed files with 6 additions and 0 deletions
|
@ -84,6 +84,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 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(
|
||||||
|
|
Loading…
Reference in a new issue