ban unban

This commit is contained in:
mihalin 2022-01-19 15:56:39 +03:00
parent d0f9042fb6
commit bc5186ba26

View File

@ -72,7 +72,7 @@ async def message_handler(message: types.Message, *args, **kwargs):
chat_id = int(chat_id)
if message.text == "/ban":
user, _ = await BannedUser.get_or_create(telegram_id=message.from_user.id, bot=bot)
user, _ = await BannedUser.get_or_create(telegram_id=chat_id, bot=bot)
await user.save()
return SendMessage(chat_id=message.chat.id, text="Пользователь заблокирован")