mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-06 03:54:50 +00:00
Try fix
This commit is contained in:
parent
365028be77
commit
bfb8a4df5c
1 changed files with 7 additions and 5 deletions
|
|
@ -78,7 +78,7 @@ async def shell(_, m):
|
||||||
cmd = m.text.split(" ", 1)
|
cmd = m.text.split(" ", 1)
|
||||||
if len(m.command) == 1:
|
if len(m.command) == 1:
|
||||||
return await edit_or_reply(m, text="No command to execute was given.")
|
return await edit_or_reply(m, text="No command to execute was given.")
|
||||||
status_message = await edit_or_reply(m, text="__Processing...__")
|
msg = await edit_or_reply(m, text="__Processing...__")
|
||||||
shell = (await shell_exec(cmd[1]))[0]
|
shell = (await shell_exec(cmd[1]))[0]
|
||||||
if len(shell) > 3000:
|
if len(shell) > 3000:
|
||||||
with open("shell_output.txt", "w") as file:
|
with open("shell_output.txt", "w") as file:
|
||||||
|
|
@ -89,13 +89,14 @@ async def shell(_, m):
|
||||||
file_name=doc.name,
|
file_name=doc.name,
|
||||||
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text="❌ Close", callback_data=f"close#{m.from_user.id}")]]),
|
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text="❌ Close", callback_data=f"close#{m.from_user.id}")]]),
|
||||||
)
|
)
|
||||||
await status_message.delete()
|
await m.delete if m.from_user.is_self else await msg.delete()
|
||||||
try:
|
try:
|
||||||
os.remove("shell_output.txt")
|
os.remove("shell_output.txt")
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
elif len(shell) != 0:
|
elif len(shell) != 0:
|
||||||
await status_message.edit(
|
await edit_or_reply(
|
||||||
|
m,
|
||||||
text=shell,
|
text=shell,
|
||||||
parse_mode=enums.ParseMode.HTML,
|
parse_mode=enums.ParseMode.HTML,
|
||||||
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text="❌ Close", callback_data=f"close#{m.from_user.id}")]]),
|
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text="❌ Close", callback_data=f"close#{m.from_user.id}")]]),
|
||||||
|
|
@ -152,9 +153,10 @@ async def evaluation_cmd_t(_, m):
|
||||||
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text="❌ Close", callback_data=f"close#{m.from_user.id}")]]),
|
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text="❌ Close", callback_data=f"close#{m.from_user.id}")]]),
|
||||||
)
|
)
|
||||||
os.remove("MissKatyEval.txt")
|
os.remove("MissKatyEval.txt")
|
||||||
await status_message.delete()
|
await m.delete if m.from_user.is_self else await status_message.delete()
|
||||||
else:
|
else:
|
||||||
await status_message.edit(
|
await edit_or_reply(
|
||||||
|
m,
|
||||||
final_output,
|
final_output,
|
||||||
parse_mode=enums.ParseMode.MARKDOWN,
|
parse_mode=enums.ParseMode.MARKDOWN,
|
||||||
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text="❌ Close", callback_data=f"close#{m.from_user.id}")]]),
|
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text="❌ Close", callback_data=f"close#{m.from_user.id}")]]),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue