From 4e92079c58d20abce0b99c2943b4ab56adf9d9db Mon Sep 17 00:00:00 2001 From: mihalin Date: Fri, 17 Sep 2021 10:58:07 +0300 Subject: [PATCH] [debug] --- server/custom.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/custom.py b/server/custom.py index 0068a03..bbe02f4 100644 --- a/server/custom.py +++ b/server/custom.py @@ -78,9 +78,14 @@ async def receive_left(message: types.Message): bot = db_bot_instance.get() if message.left_chat_member.id == message.bot.id: chat = await bot.group_chats.filter(chat_id=message.chat.id).first() + print("chat found", chat) if chat: await bot.group_chats.remove(chat) + print("chat removed") + print(bot.group_chat) + print(chat) if bot.group_chat == chat: + print("saved") bot.group_chat = None await bot.save(update_fields=["group_chat"])