fix(moderation): check for the correct permission when using unban command
All checks were successful
Pylint / Pylint (3.10) (push) Successful in 56s

This commit is contained in:
Seaswimmer 2023-10-22 14:15:03 -04:00
parent 4f513a44a9
commit d0e36282b5
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -587,7 +587,7 @@ class Moderation(commands.Cog):
if interaction.user.top_role <= target_member.top_role:
await interaction.response.send_message(content="You cannot moderate members with a higher role than you!", ephemeral=True)
return
permissions = self.check_permissions(interaction.client.user, ['moderate_members'], interaction)
permissions = self.check_permissions(interaction.client.user, ['ban_members'], interaction)
if permissions:
await interaction.response.send_message(f"I do not have the `{permissions}` permission, required for this action.", ephemeral=True)
return