clash-telegram-bot/handlers/group/main.py

13 lines
293 B
Python
Raw Normal View History

2022-03-18 22:25:50 +03:00
from aiogram import types
from load import dp, bot, config
from database.worker import delete
@dp.message_handler(is_chat=True, content_types=['left_chat_member'])
async def on_left(message: types.Message):
user_id = message.from_user.id
delete(user_id)
await message.delete()