[check] some changes

This commit is contained in:
levina 2022-02-24 13:32:46 +07:00 committed by GitHub
parent ea90793dad
commit 50747f1e32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"