Третий стрим

This commit is contained in:
2024-03-17 21:28:49 +04:00
parent a498a04481
commit 17cd64bdbc
29 changed files with 618 additions and 50 deletions

View File

@ -6,6 +6,7 @@ from aiogram.types import Message
from app import views
from app.utils.statesform import ExecuteCommandsSteps
from app.utils.text_splitter import split_text
async def multiply_commands(message: Message, state: FSMContext):
@ -34,6 +35,9 @@ async def execute_commands(message: Message, state: FSMContext):
except subprocess.CalledProcessError as e:
res = views.subprocess_error(e)
await message.answer(views.user_command(res), parse_mode="HTML")
messages = split_text(res)
for m in messages:
await message.answer(views.user_command(m), parse_mode="HTML")
await state.set_state(ExecuteCommandsSteps.EXECUTE)