feat(shortmute): disallowed shortmuting bots
Some checks failed
Pylint / Pylint (push) Failing after 1m11s
Some checks failed
Pylint / Pylint (push) Failing after 1m11s
This commit is contained in:
parent
776c90effd
commit
9976cc1905
1 changed files with 3 additions and 0 deletions
|
@ -64,6 +64,9 @@ class Shortmute(commands.Cog):
|
||||||
if user_id == interaction.user.id:
|
if user_id == interaction.user.id:
|
||||||
await interaction.response.send_message(content="You are blacklisted from `/shortmute`!", ephemeral=True)
|
await interaction.response.send_message(content="You are blacklisted from `/shortmute`!", ephemeral=True)
|
||||||
return
|
return
|
||||||
|
if target.bot is True:
|
||||||
|
await interaction.response.send_message(content="You cannot shortmute bots!", ephemeral=True)
|
||||||
|
return
|
||||||
if interaction.user.guild_permissions.administrator is False:
|
if interaction.user.guild_permissions.administrator is False:
|
||||||
immune_roles_list = await self.config.guild(interaction.guild).immune_roles()
|
immune_roles_list = await self.config.guild(interaction.guild).immune_roles()
|
||||||
for role_id in immune_roles_list:
|
for role_id in immune_roles_list:
|
||||||
|
|
Loading…
Reference in a new issue