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
+1
View File
@@ -12,6 +12,7 @@ BANNED_WORDS = [
"rape", "porn", "sex", "cock", "cum", "slut", "whore", "kys", "nigga" "rape", "porn", "sex", "cock", "cum", "slut", "whore", "kys", "nigga"
] ]
STAFF_ROLES_FOR_PING = ["GetAnnoyedByTars"] STAFF_ROLES_FOR_PING = ["GetAnnoyedByTars"]
IMMUNITY_ROLES = ["Senior Admin, Head Admin, Co-Owner, Owner"]
recent_messages = {} recent_messages = {}
recent_message_timestamps = {} recent_message_timestamps = {}
recent_joins = [] recent_joins = []
+3 -1
View File
@@ -9,7 +9,7 @@ from datetime import datetime, timedelta
import logging import logging
from tars import tars_text from tars import tars_text
from config import STAFF_ROLES_FOR_PING, recent_messages, recent_message_timestamps, \ 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") logger = logging.getLogger("tars")
WARN_THRESHOLD = 3 WARN_THRESHOLD = 3
@@ -20,6 +20,8 @@ async def handle_moderation(message):
return return
if any(role.name in STAFF_ROLES_FOR_PING for role in message.author.roles): if any(role.name in STAFF_ROLES_FOR_PING for role in message.author.roles):
return return
if any(role.name in IMMUNITY_ROLES for role in message.author.roles):
return
text = message.content or "" text = message.content or ""
uid = str(message.author.id) uid = str(message.author.id)
g = message.guild g = message.guild