From 016cce8945a2cb9e849726f1b05cece763e0531b Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 27 Sep 2023 13:40:18 -0400 Subject: [PATCH] fix(shortmute): fixed error if you attempt to shortmute someone with the administrator permission --- shortmute/shortmute.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shortmute/shortmute.py b/shortmute/shortmute.py index 6080c91..7141c50 100644 --- a/shortmute/shortmute.py +++ b/shortmute/shortmute.py @@ -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: