Important fix for moderation

This commit is contained in:
2025-11-15 14:44:27 +01:00
parent 4bf67b78ab
commit d5bda6fe5f
+1 -1
View File
@@ -149,7 +149,7 @@ async def handle_moderation(message):
ping_staff=(count >= WARN_THRESHOLD)
)
return
if any(w in text for w in DRUG_KEYWORDS):
if any(re.search(rf"\b{re.escape(w)}\b", text, re.IGNORECASE) for w in DRUG_KEYWORDS):
count = await increment_warning(uid)
await add_warn_log(uid, "Drug mention")
await message.channel.send(