Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
905276d
1
Parent(s):
b5992ae
Update info.py
Browse files- Powers/plugins/info.py +6 -2
Powers/plugins/info.py
CHANGED
|
@@ -237,6 +237,9 @@ async def chat_info(c: Gojo, chat, already=False):
|
|
| 237 |
|
| 238 |
@Gojo.on_message(command(["info", "whois"]))
|
| 239 |
async def info_func(c: Gojo, message: Message):
|
|
|
|
|
|
|
|
|
|
| 240 |
user, _, user_name = await extract_user(c, message)
|
| 241 |
|
| 242 |
if not user:
|
|
@@ -290,8 +293,9 @@ async def chat_info_func(c: Gojo, message: Message):
|
|
| 290 |
splited = message.text.split()
|
| 291 |
if len(splited) == 1:
|
| 292 |
if message.reply_to_message and message.reply_to_message.sender_chat:
|
| 293 |
-
chat =
|
| 294 |
-
|
|
|
|
| 295 |
|
| 296 |
else:
|
| 297 |
chat = splited[1]
|
|
|
|
| 237 |
|
| 238 |
@Gojo.on_message(command(["info", "whois"]))
|
| 239 |
async def info_func(c: Gojo, message: Message):
|
| 240 |
+
if message.reply_to_message and message.reply_to_message.sender_chat:
|
| 241 |
+
await message.reply_text("This is not a user, but rather a channel. Use `/chinfo` to fetch its information.")
|
| 242 |
+
return
|
| 243 |
user, _, user_name = await extract_user(c, message)
|
| 244 |
|
| 245 |
if not user:
|
|
|
|
| 293 |
splited = message.text.split()
|
| 294 |
if len(splited) == 1:
|
| 295 |
if message.reply_to_message and message.reply_to_message.sender_chat:
|
| 296 |
+
chat = message.reply_to_message.sender_chat.id
|
| 297 |
+
else:
|
| 298 |
+
chat = message.chat.id
|
| 299 |
|
| 300 |
else:
|
| 301 |
chat = splited[1]
|