From 4f772b5657dce2af92bfe26e21aaabebb39d05e3 Mon Sep 17 00:00:00 2001 From: mrfluffy Date: Fri, 29 Aug 2025 22:23:52 +0100 Subject: [PATCH] oopsie fix url stuff --- bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 1cabc25..ce31cd7 100644 --- a/bot.py +++ b/bot.py @@ -22,11 +22,11 @@ async def on_message(message): if message.author == bot.user: return - # Check if the message contains "nixos" (case-insensitive, as a whole word) + # Check if the message contains "nixos" (case-insensitive, as a whole word, not in a URL) if re.search(r'\bnixos\b', message.content, re.IGNORECASE): - # Replace "nixos" with "fagOS" (preserving case of the first letter) + # Replace "nixos" with "fagOS" (preserving case of the first letter), but exclude URLs new_content = re.sub( - r'\b(nixos)\b', + r'(?