first commit

This commit is contained in:
2024-10-29 16:09:13 +03:00
commit 8bdd4be9b0
42 changed files with 2605 additions and 0 deletions

14
bot.0.1/handlers/other.py Executable file
View File

@@ -0,0 +1,14 @@
from aiogram import types, Dispatcher
import json
import string
async def reaction(message: types.Message):
if {i.lower().translate(str.maketrans("", "", string.punctuation)) for i in message.text.split(" ")} \
.intersection(set(json.load(open("censorship.json")))):
await message.reply(f"\U0001F92CМаты запрещены!!!\U0001F621\U0001F621\U0001F621")
await message.delete()
def register_handlers_other(dp: Dispatcher):
dp.register_message_handler(reaction)