diff --git a/config.py b/config.py index dec957d..d95c1e2 100644 --- a/config.py +++ b/config.py @@ -12,6 +12,7 @@ BANNED_WORDS = [ "rape", "porn", "sex", "cock", "cum", "slut", "whore", "kys", "nigga" ] STAFF_ROLES_FOR_PING = ["GetAnnoyedByTars"] +IMMUNITY_ROLES = ["Senior Admin, Head Admin, Co-Owner, Owner"] recent_messages = {} recent_message_timestamps = {} recent_joins = [] diff --git a/helper_moderation.py b/helper_moderation.py index 165b59e..e10ba93 100644 --- a/helper_moderation.py +++ b/helper_moderation.py @@ -9,7 +9,7 @@ from datetime import datetime, timedelta import logging from tars import tars_text from config import STAFF_ROLES_FOR_PING, recent_messages, recent_message_timestamps, \ - NWORD_PATTERN, SUICIDE_PATTERNS, DRUG_KEYWORDS, DB_FILE + NWORD_PATTERN, SUICIDE_PATTERNS, DRUG_KEYWORDS, DB_FILE, IMMUNITY_ROLES logger = logging.getLogger("tars") WARN_THRESHOLD = 3 @@ -20,6 +20,8 @@ async def handle_moderation(message): return if any(role.name in STAFF_ROLES_FOR_PING for role in message.author.roles): return + if any(role.name in IMMUNITY_ROLES for role in message.author.roles): + return text = message.content or "" uid = str(message.author.id) g = message.guild