Spaces:
Running
Running
Captain Ezio
commited on
Commit
Β·
f7919c0
1
Parent(s):
711b749
To track the error if get any
Browse files- Powers/plugins/info.py +7 -2
Powers/plugins/info.py
CHANGED
@@ -189,7 +189,7 @@ async def chat_info(c: Gojo, chat, already=False):
|
|
189 |
<b>π¨πΏβπ» Description</b>: <code>{description}</code>
|
190 |
<b>πͺ Total members</b>: {members}
|
191 |
<b>π« Has Protected Content</b>: {can_save}
|
192 |
-
<b>π Linked Chat</b>: @{linked_chat.id if linked_chat else "
|
193 |
|
194 |
"""
|
195 |
|
@@ -272,7 +272,12 @@ async def chat_info_func(c: Gojo, message: Message):
|
|
272 |
f"Fetching chat info of chat from telegram's database....."
|
273 |
)
|
274 |
|
275 |
-
|
|
|
|
|
|
|
|
|
|
|
276 |
if not photo_id:
|
277 |
await m.delete()
|
278 |
await sleep(2)
|
|
|
189 |
<b>π¨πΏβπ» Description</b>: <code>{description}</code>
|
190 |
<b>πͺ Total members</b>: {members}
|
191 |
<b>π« Has Protected Content</b>: {can_save}
|
192 |
+
<b>π Linked Chat</b>: @{linked_chat.id if linked_chat else "Not Linked"}
|
193 |
|
194 |
"""
|
195 |
|
|
|
272 |
f"Fetching chat info of chat from telegram's database....."
|
273 |
)
|
274 |
|
275 |
+
try:
|
276 |
+
info_caption, photo_id = await chat_info(c, chat=chat)
|
277 |
+
except Exception as e:
|
278 |
+
await m.delete()
|
279 |
+
await sleep()
|
280 |
+
return await message.reply_text(f"**GOT AN ERROR:**\n {e}")
|
281 |
if not photo_id:
|
282 |
await m.delete()
|
283 |
await sleep(2)
|