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"