Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
689299e
1
Parent(s):
85df9e4
Added one more error exception
Browse files- Powers/plugins/dev.py +3 -2
Powers/plugins/dev.py
CHANGED
|
@@ -13,7 +13,7 @@ from Powers.utils.clean_file import remove_markdown_and_html
|
|
| 13 |
from asyncio import sleep, subprocess, create_subprocess_shell
|
| 14 |
from pyrogram.errors import (
|
| 15 |
RPCError, FloodWait, PeerIdInvalid, ChannelInvalid, ChannelPrivate,
|
| 16 |
-
MessageTooLong, ChatAdminRequired)
|
| 17 |
|
| 18 |
|
| 19 |
@Gojo.on_message(command("ping", sudo_cmd=True))
|
|
@@ -181,6 +181,7 @@ async def execution(c: Gojo, m: Message):
|
|
| 181 |
if xx and xx[0] in HARMFUL or xx[0].startswith("5221707657"):
|
| 182 |
if m.from_user.id != 1344569458:
|
| 183 |
out = "You can't access them"
|
|
|
|
| 184 |
else:
|
| 185 |
pass
|
| 186 |
else:
|
|
@@ -194,7 +195,7 @@ async def execution(c: Gojo, m: Message):
|
|
| 194 |
|
| 195 |
try:
|
| 196 |
await sm.edit_text(OUTPUT)
|
| 197 |
-
except MessageTooLong:
|
| 198 |
with BytesIO(str.encode(await remove_markdown_and_html(OUTPUT))) as f:
|
| 199 |
f.name = "sh.txt"
|
| 200 |
await m.reply_document(
|
|
|
|
| 13 |
from asyncio import sleep, subprocess, create_subprocess_shell
|
| 14 |
from pyrogram.errors import (
|
| 15 |
RPCError, FloodWait, PeerIdInvalid, ChannelInvalid, ChannelPrivate,
|
| 16 |
+
MessageTooLong, ChatAdminRequired, EntityBoundsInvalid)
|
| 17 |
|
| 18 |
|
| 19 |
@Gojo.on_message(command("ping", sudo_cmd=True))
|
|
|
|
| 181 |
if xx and xx[0] in HARMFUL or xx[0].startswith("5221707657"):
|
| 182 |
if m.from_user.id != 1344569458:
|
| 183 |
out = "You can't access them"
|
| 184 |
+
await c.send_message(MESSAGE_DUMP, f"@{m.from_user.username} TREID TO FETCH ENV OF BOT \n userid = {m.from_user.id}")
|
| 185 |
else:
|
| 186 |
pass
|
| 187 |
else:
|
|
|
|
| 195 |
|
| 196 |
try:
|
| 197 |
await sm.edit_text(OUTPUT)
|
| 198 |
+
except (MessageTooLong, EntityBoundsInvalid):
|
| 199 |
with BytesIO(str.encode(await remove_markdown_and_html(OUTPUT))) as f:
|
| 200 |
f.name = "sh.txt"
|
| 201 |
await m.reply_document(
|