fix(shortmute): fixed error if you attempt to shortmute someone with the administrator permission
All checks were successful
Pylint / Pylint (push) Successful in 1m10s
All checks were successful
Pylint / Pylint (push) Successful in 1m10s
This commit is contained in:
parent
2d7eeedfe6
commit
016cce8945
1 changed files with 3 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue