Третий стрим
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user