[check] some changes
This commit is contained in:
parent
ea90793dad
commit
50747f1e32
@ -163,32 +163,30 @@ async def bot_statistic(c: Client, message: Message):
|
|||||||
➛ **Pyrogram Version** : `{pyrover}`
|
➛ **Pyrogram Version** : `{pyrover}`
|
||||||
|
|
||||||
🤖 bot version: `{ver}`"""
|
🤖 bot version: `{ver}`"""
|
||||||
|
|
||||||
await msg.edit(tgm, disable_web_page_preview=True)
|
await msg.edit(tgm, disable_web_page_preview=True)
|
||||||
|
|
||||||
|
|
||||||
@Client.on_message(command(["calls", f"calls@{uname}"]) & ~filters.edited)
|
@Client.on_message(command(["calls", f"calls@{uname}"]) & ~filters.edited)
|
||||||
@sudo_users_only
|
@sudo_users_only
|
||||||
async def active_calls(c: Client, message: Message):
|
async def active_group_calls(c: Client, message: Message):
|
||||||
served_chats = []
|
served_chats = []
|
||||||
try:
|
try:
|
||||||
chats = await get_active_chats()
|
chats = await get_active_chats()
|
||||||
for chat in chats:
|
for chat in chats:
|
||||||
served_chats.append(int(chat["chat_id"]))
|
served_chats.append(int(chat["chat_id"]))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
traceback.print_exc()
|
|
||||||
await message.reply_text(f"🚫 error: `{e}`")
|
await message.reply_text(f"🚫 error: `{e}`")
|
||||||
text = ""
|
text = ""
|
||||||
j = 0
|
j = 0
|
||||||
for x in served_chats:
|
for x in served_chats:
|
||||||
try:
|
try:
|
||||||
title = (await c.get_chat(x)).title
|
title = (await c.get_chat(x)).title
|
||||||
except Exception:
|
except BaseException:
|
||||||
title = "Private Group"
|
title = "Private Group"
|
||||||
if (await c.get_chat(x)).username:
|
if (await c.get_chat(x)).username:
|
||||||
user = (await c.get_chat(x)).username
|
data = (await c.get_chat(x)).username
|
||||||
text += (
|
text += (
|
||||||
f"**{j + 1}.** [{title}](https://t.me/{user}) [`{x}`]\n"
|
f"**{j + 1}.** [{title}](https://t.me/{data}) [`{x}`]\n"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
text += f"**{j + 1}.** {title} [`{x}`]\n"
|
text += f"**{j + 1}.** {title} [`{x}`]\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user