Captain Ezio commited on
Commit
f7919c0
Β·
1 Parent(s): 711b749

To track the error if get any

Browse files
Files changed (1) hide show
  1. 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 "Noe Linked"}
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
- info_caption, photo_id = await chat_info(c, chat=chat)
 
 
 
 
 
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)