Spaces:
Running
Running
Captain Ezio
commited on
Commit
·
61ca439
1
Parent(s):
5c9c39e
Changed `info` plugin
Browse files- Powers/plugins/info.py +6 -4
Powers/plugins/info.py
CHANGED
@@ -226,10 +226,12 @@ async def chat_info_func(c: Gojo, message: Message):
|
|
226 |
chat = splited[1]
|
227 |
|
228 |
try:
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
|
|
233 |
|
234 |
m = await message.reply_text(
|
235 |
f"Fetching chat info of chat **{message.chat.title}**....."
|
|
|
226 |
chat = splited[1]
|
227 |
|
228 |
try:
|
229 |
+
chat = int(chat)
|
230 |
+
except (ValueError, Exception) as ef:
|
231 |
+
if "invalid literal for int() with base 10:" in str(ef):
|
232 |
+
chat = str(chat)
|
233 |
+
else:
|
234 |
+
return await message.reply_text(f"Got and exception {e}\n**Usage:**/chinfo [USERNAME|ID]")
|
235 |
|
236 |
m = await message.reply_text(
|
237 |
f"Fetching chat info of chat **{message.chat.title}**....."
|