all_message.py 283 B

12345678910
  1. from aiogram import types, Dispatcher
  2. from bot.notifications import trash_msg
  3. async def handle_all(message: types.Message):
  4. await trash_msg(message.text,message.from_user.username)
  5. def register(dp: Dispatcher):
  6. dp.register_message_handler(handle_all, chat_type='private')