From 50747f1e321ab6107979f15242f19bf2b27dd2c1 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Thu, 24 Feb 2022 13:32:46 +0700 Subject: [PATCH] [check] some changes --- program/essentials.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/program/essentials.py b/program/essentials.py index 2463129..c55f0b5 100644 --- a/program/essentials.py +++ b/program/essentials.py @@ -163,32 +163,30 @@ async def bot_statistic(c: Client, message: Message): ➛ **Pyrogram Version** : `{pyrover}` 🤖 bot version: `{ver}`""" - await msg.edit(tgm, disable_web_page_preview=True) @Client.on_message(command(["calls", f"calls@{uname}"]) & ~filters.edited) @sudo_users_only -async def active_calls(c: Client, message: Message): +async def active_group_calls(c: Client, message: Message): served_chats = [] try: chats = await get_active_chats() for chat in chats: served_chats.append(int(chat["chat_id"])) except Exception as e: - traceback.print_exc() await message.reply_text(f"🚫 error: `{e}`") text = "" j = 0 for x in served_chats: try: title = (await c.get_chat(x)).title - except Exception: + except BaseException: title = "Private Group" if (await c.get_chat(x)).username: - user = (await c.get_chat(x)).username + data = (await c.get_chat(x)).username text += ( - f"**{j + 1}.** [{title}](https://t.me/{user}) [`{x}`]\n" + f"**{j + 1}.** [{title}](https://t.me/{data}) [`{x}`]\n" ) else: text += f"**{j + 1}.** {title} [`{x}`]\n"