Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
3972d11
1
Parent(s):
1af588c
Update info.py
Browse files- Powers/plugins/info.py +5 -3
Powers/plugins/info.py
CHANGED
@@ -158,7 +158,7 @@ async def info_func(c: Gojo, message: Message):
|
|
158 |
await message.reply_text("You are not providing proper arguments.......**Usage:**/info [USERNAME|ID]....Example /info @iamgojoof6eyes")
|
159 |
await message.stop_propagation()
|
160 |
|
161 |
-
if
|
162 |
user = message.reply_to_message.from_user.id
|
163 |
else:
|
164 |
try:
|
@@ -206,7 +206,7 @@ async def chat_info_func(c: Gojo, message: Message):
|
|
206 |
chat = splited[1]
|
207 |
|
208 |
|
209 |
-
m = await message.reply_text(f"Fetching chat info of chat **{chat.title}**.....")
|
210 |
|
211 |
info_caption, photo_id = await chat_info(c, chat=chat)
|
212 |
if not photo_id:
|
@@ -219,7 +219,9 @@ async def chat_info_func(c: Gojo, message: Message):
|
|
219 |
await m.delete()
|
220 |
os.remove(photo)
|
221 |
except Exception as e:
|
222 |
-
await
|
|
|
|
|
223 |
LOGGER.error(e)
|
224 |
LOGGER.error(format_exc())
|
225 |
|
|
|
158 |
await message.reply_text("You are not providing proper arguments.......**Usage:**/info [USERNAME|ID]....Example /info @iamgojoof6eyes")
|
159 |
await message.stop_propagation()
|
160 |
|
161 |
+
if message.reply_to_message and not message.reply_to_message.from_user:
|
162 |
user = message.reply_to_message.from_user.id
|
163 |
else:
|
164 |
try:
|
|
|
206 |
chat = splited[1]
|
207 |
|
208 |
|
209 |
+
m = await message.reply_text(f"Fetching chat info of chat **{message.chat.title}**.....")
|
210 |
|
211 |
info_caption, photo_id = await chat_info(c, chat=chat)
|
212 |
if not photo_id:
|
|
|
219 |
await m.delete()
|
220 |
os.remove(photo)
|
221 |
except Exception as e:
|
222 |
+
await message.edit(chat_id=message.chat.id,
|
223 |
+
message_id=message.id,
|
224 |
+
e)
|
225 |
LOGGER.error(e)
|
226 |
LOGGER.error(format_exc())
|
227 |
|