From 40354c8c0c63cf4af26ca03e0549a97e18f93cf8 Mon Sep 17 00:00:00 2001 From: emirsassan Date: Sun, 14 Dec 2025 19:56:12 +0300 Subject: [PATCH] =?UTF-8?q?lan=20m=C4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bot.py b/bot.py index ded6e1c..c2d9931 100644 --- a/bot.py +++ b/bot.py @@ -1,4 +1,5 @@ import os +import re from dotenv import load_dotenv import discord from discord.ui import Modal, TextInput, View, Button, ChannelSelect, RoleSelect @@ -27,6 +28,8 @@ client = commands.Bot(command_prefix="!", intents=discord.Intents.all()) +regex = re.compile(r'(^|\s)lan[.!?]?$', re.IGNORECASE) + # region ACTIONS async def reply_no_permission(context: Context): @@ -760,6 +763,9 @@ async def on_message(msg): print(e) else: print(f"{member} isimli kullanıcı bulunamadı.") + + if regex.search(msg.content): + await msg.reply("-# lan mı") await client.process_commands(msg) return