From bc5186ba26a699e3a78d56ea4888ba95977e1d46 Mon Sep 17 00:00:00 2001 From: mihalin Date: Wed, 19 Jan 2022 15:56:39 +0300 Subject: [PATCH] ban unban --- server/custom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/custom.py b/server/custom.py index c3ef258..717f946 100644 --- a/server/custom.py +++ b/server/custom.py @@ -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="Пользователь заблокирован")