Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
d0b30c9
1
Parent(s):
711f15b
Update info.py
Browse files- Powers/plugins/info.py +11 -5
Powers/plugins/info.py
CHANGED
@@ -2,7 +2,7 @@ import os
|
|
2 |
|
3 |
from pyrogram.types import Message
|
4 |
|
5 |
-
from Powers import
|
6 |
from Powers.bot_class import Gojo
|
7 |
from Powers.utils.custom_filters import command
|
8 |
|
@@ -101,8 +101,12 @@ async def info_func(_, message: Message):
|
|
101 |
|
102 |
try:
|
103 |
info_caption, photo_id = await get_user_info(user)
|
|
|
104 |
except Exception as e:
|
105 |
-
|
|
|
|
|
|
|
106 |
|
107 |
if not photo_id:
|
108 |
return await m.edit(
|
@@ -142,14 +146,16 @@ async def chat_info_func(_, message: Message):
|
|
142 |
await message.reply_photo(
|
143 |
photo, caption=info_caption, quote=False
|
144 |
)
|
145 |
-
|
146 |
await m.delete()
|
147 |
os.remove(photo)
|
148 |
except Exception as e:
|
149 |
await m.edit(e)
|
150 |
-
|
|
|
|
|
151 |
__PLUGIN__ = "info"
|
152 |
_DISABLE_CMDS_ = [
|
153 |
"info",
|
154 |
"chinfo",
|
155 |
-
]
|
|
|
2 |
|
3 |
from pyrogram.types import Message
|
4 |
|
5 |
+
from Powers import DEV_USERS, SUDO_USERS, WHITELIST_USERS, SUPPORT_STAFF, LOGGER
|
6 |
from Powers.bot_class import Gojo
|
7 |
from Powers.utils.custom_filters import command
|
8 |
|
|
|
101 |
|
102 |
try:
|
103 |
info_caption, photo_id = await get_user_info(user)
|
104 |
+
LOGGER.info(f"{message.from_user.id} fetched user info of {user} in {message.chat.id}")
|
105 |
except Exception as e:
|
106 |
+
await m.edit(str(e))
|
107 |
+
LOGGER.error(e)
|
108 |
+
LOGGER.error(format_exc())
|
109 |
+
return
|
110 |
|
111 |
if not photo_id:
|
112 |
return await m.edit(
|
|
|
146 |
await message.reply_photo(
|
147 |
photo, caption=info_caption, quote=False
|
148 |
)
|
149 |
+
LOGGER.info(f"{message.from_user.id} fetched chat info of chat {message.chat.id} in {message.chat.id}")
|
150 |
await m.delete()
|
151 |
os.remove(photo)
|
152 |
except Exception as e:
|
153 |
await m.edit(e)
|
154 |
+
LOGGER.error(e)
|
155 |
+
LOGGER.error(format_exc())
|
156 |
+
|
157 |
__PLUGIN__ = "info"
|
158 |
_DISABLE_CMDS_ = [
|
159 |
"info",
|
160 |
"chinfo",
|
161 |
+
]
|