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