Update moderation.py

This commit is contained in:
Paillat
2023-02-02 21:54:41 +01:00
parent db79c60ff4
commit db4645fc66

View File

@@ -37,7 +37,6 @@ class Moderation (discord.Cog):
channel = self.bot.get_channel(int(data[1])) channel = self.bot.get_channel(int(data[1]))
is_enabled = data[2] is_enabled = data[2]
moderator_role = message.guild.get_role(int(data[3])) moderator_role = message.guild.get_role(int(data[3]))
author_roles = message.author.roles
#we also do that with the manage_messages permission, so the moderators can't be moderated #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.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 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