fix(aurora): fixed a 403 forbidden error in some moderation type handlers when moderating someone with the administrator permission
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 28s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 42s

This commit is contained in:
Seaswimmer 2024-08-19 17:23:53 -04:00
parent 29f393fa89
commit b0509d748c
Signed by: cswimr
GPG key ID: 3813315477F26F82

View file

@ -84,6 +84,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 isinstance(target, Member):
if ctx.author.top_role <= target.top_role and await config.guild(ctx.guild).respect_hierarchy() is True:
await ctx.send(