Small update to profanity

This commit is contained in:
2025-11-21 18:28:38 +01:00
parent 1369650f86
commit 430057456c
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -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