Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiTheModder committed Jul 15, 2024
1 parent 7ff96be commit a266c35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/antipm.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ async def anti_pm_handler(client: Client, message: Message):
if db.get("core.antipm", "block", False):
await client.block_user(user_info)

if db.get("core.antipm", f"disallowusers{id}") == user_id != db.get(
if db.get("core.antipm", f"disallowusers{ids}") == user_id != db.get(
"core.antipm", f"allowusers{ids}"
) or db.get("core.antipm", f"disallowusers{id}") != user_id != db.get(
) or db.get("core.antipm", f"disallowusers{ids}") != user_id != db.get(
"core.antipm", f"allowusers{ids}"
):
await client.send_message(message.chat.id, f"{default_text}")
Expand Down
6 changes: 5 additions & 1 deletion modules/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

from pyrogram import Client, filters
from pyrogram.types import Message
from pyrogram.errors import MessageTooLong

from utils.misc import modules_help, prefix

Expand Down Expand Up @@ -53,7 +54,10 @@ async def shell(_, message: Message):
if stderr:
text += f"<b>Error:</b>\n<code>{stderr}</code>\n\n"
text += f"<b>Completed in {round(stop_time - start_time, 5)} seconds with code {cmd_obj.returncode}</b>"
await message.edit(text)
try:
await message.edit(text)
except MessageTooLong:
await message.edit(text[:-100])
cmd_obj.kill()


Expand Down

0 comments on commit a266c35

Please sign in to comment.