mirror of
				https://github.com/civsocit/olgram.git
				synced 2023-07-22 01:29:12 +03:00 
			
		
		
		
	[debug]
This commit is contained in:
		
							parent
							
								
									27666ae584
								
							
						
					
					
						commit
						4e92079c58
					
				@ -78,9 +78,14 @@ async def receive_left(message: types.Message):
 | 
				
			|||||||
    bot = db_bot_instance.get()
 | 
					    bot = db_bot_instance.get()
 | 
				
			||||||
    if message.left_chat_member.id == message.bot.id:
 | 
					    if message.left_chat_member.id == message.bot.id:
 | 
				
			||||||
        chat = await bot.group_chats.filter(chat_id=message.chat.id).first()
 | 
					        chat = await bot.group_chats.filter(chat_id=message.chat.id).first()
 | 
				
			||||||
 | 
					        print("chat found", chat)
 | 
				
			||||||
        if chat:
 | 
					        if chat:
 | 
				
			||||||
            await bot.group_chats.remove(chat)
 | 
					            await bot.group_chats.remove(chat)
 | 
				
			||||||
 | 
					            print("chat removed")
 | 
				
			||||||
 | 
					            print(bot.group_chat)
 | 
				
			||||||
 | 
					            print(chat)
 | 
				
			||||||
            if bot.group_chat == chat:
 | 
					            if bot.group_chat == chat:
 | 
				
			||||||
 | 
					                print("saved")
 | 
				
			||||||
                bot.group_chat = None
 | 
					                bot.group_chat = None
 | 
				
			||||||
                await bot.save(update_fields=["group_chat"])
 | 
					                await bot.save(update_fields=["group_chat"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user