From 16e944707fc59543e1b7b3cd32a33c99dd00a85a Mon Sep 17 00:00:00 2001 From: mihalin Date: Fri, 2 Sep 2022 04:48:16 +0400 Subject: [PATCH] debug print --- server/custom.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/custom.py b/server/custom.py index d17aed6..4712c96 100644 --- a/server/custom.py +++ b/server/custom.py @@ -243,13 +243,18 @@ async def edited_message_handler(message: types.Message, *args, **kwargs): async def receive_invite(message: types.Message): bot = db_bot_instance.get() + print("RECEIVE INVITE") for member in message.new_chat_members: + print("MEMBER ", str(member)) if member.id == message.bot.id: + print("MEMBER IS BOT") chat, _ = await GroupChat.get_or_create(chat_id=message.chat.id, defaults={"name": message.chat.full_name}) chat.name = message.chat.full_name + print("SAVE CHAT ", _) await chat.save() if chat not in await bot.group_chats.all(): + print("ADD CHAT") await bot.group_chats.add(chat) await bot.save() break