From 346012c9cad5640ee2b4013d24d8e813b4e6f645 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Thu, 24 Feb 2022 12:02:44 +0700 Subject: [PATCH] [check] some changes --- program/developer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/program/developer.py b/program/developer.py index f3ec21d..c5e310c 100644 --- a/program/developer.py +++ b/program/developer.py @@ -28,6 +28,7 @@ from inspect import getfullargspec from config import BOT_USERNAME as bname from driver.core import bot +from driver.queues import QUEUE from driver.filters import command from driver.database.dbchat import remove_served_chat from driver.decorators import bot_creator, sudo_users_only, errors @@ -198,11 +199,14 @@ async def bot_leave_group(_, message): ) return chat = message.text.split(None, 2)[1] + if chat in QUEUE: + await remove_active_chat(chat) + return try: await bot.leave_chat(chat) + await user.leave_chat(chat) await remove_served_chat(chat) except Exception as e: await message.reply_text(f"āŒ procces failed\n\nreason: `{e}`") - print(e) return await message.reply_text(f"āœ… Bot successfully left from the Group:\n\nšŸ’­ Ā» `{chat}`")