first commit
This commit is contained in:
14
bot.0.1/handlers/other.py
Executable file
14
bot.0.1/handlers/other.py
Executable 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)
|
||||
Reference in New Issue
Block a user