Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bot.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down