Второй стрим
This commit is contained in:
12
app/handlers/single_command.py
Normal file
12
app/handlers/single_command.py
Normal 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("&", "&").replace("<", "<").replace(">", ">")
|
||||
await message.answer(views.user_command(res), parse_mode="HTML")
|
Reference in New Issue
Block a user