From db79c60ff4c04984a159469fe189313939f14c8e Mon Sep 17 00:00:00 2001 From: Paillat Date: Thu, 2 Feb 2023 21:53:04 +0100 Subject: [PATCH] Update moderation.py --- code/cogs/moderation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/cogs/moderation.py b/code/cogs/moderation.py index a077f3c..a37defc 100644 --- a/code/cogs/moderation.py +++ b/code/cogs/moderation.py @@ -37,7 +37,9 @@ class Moderation (discord.Cog): channel = self.bot.get_channel(int(data[1])) is_enabled = data[2] moderator_role = message.guild.get_role(int(data[3])) - if moderator_role in message.author.roles: return #if the user is a moderator, we don't want to moderate him because he is allowed to say whatever he wants because he is just like a dictator + author_roles = message.author.roles + #we also do that with the manage_messages permission, so the moderators can't be moderated + if message.author.guild_permissions.manage_messages: return #if the user is a moderator, we don't want to moderate him because he is allowed to say whatever he wants because he is just like a dictator if message.author.guild_permissions.administrator: return #if the user is an administrator, we don't want to moderate him because he is allowed to say whatever he wants because he is a DICTATOR if not is_enabled: return content = message.content