fix(shortmute): fixed error if you attempt to shortmute someone with the administrator permission
All checks were successful
Pylint / Pylint (push) Successful in 1m10s

This commit is contained in:
SeaswimmerTheFsh 2023-09-27 13:40:18 -04:00
parent 2d7eeedfe6
commit 016cce8945
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -71,6 +71,9 @@ class Shortmute(commands.Cog):
if role in target.roles:
await interaction.response.send_message(content="You're trying to shortmute someone who is immune from shortmuting.", ephemeral=True)
return
if target.guild_permissions.administrator is True:
await interaction.response.send_message(content="You cannot shortmute people with the Administrator permission!")
return
if duration in (1, -1):
readable_duration = f"{duration} minute"
else: