small fixes
This commit is contained in:
@@ -65,9 +65,9 @@ Do not spam further messages else I may have to block you!</i>
|
||||
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}")
|
||||
|
||||
@@ -20,6 +20,7 @@ from time import perf_counter
|
||||
|
||||
from pyrogram import Client, filters
|
||||
from pyrogram.types import Message
|
||||
from pyrogram.errors import MessageTooLong
|
||||
|
||||
from utils.misc import modules_help, prefix
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user