Files
Tg-bot/bot.0.1/handlers/other.py
2024-10-29 16:09:13 +03:00

15 lines
522 B
Python
Executable File

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)