Второй стрим

This commit is contained in:
2024-03-11 01:56:43 +04:00
parent 2649b9136a
commit 62922cf613
11 changed files with 147 additions and 12 deletions

View File

@ -0,0 +1,12 @@
import subprocess
from aiogram.types import Message
from app import views
async def execute_command(message: Message):
user_command = message.text.split()[1:]
sub = subprocess.check_output(user_command, shell=True)
res = sub.decode().replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
await message.answer(views.user_command(res), parse_mode="HTML")