terminal_commands module
Terminal commands: sandboxed command execution via Docker containers.
- async terminal_commands.run_in_sandbox(command, timeout_sec=10, max_output_chars=3500)[מקור]
Run a shell command inside a locked-down Docker container and return (rc, output).
- async terminal_commands.terminal_enter(update, context)[מקור]
Enter terminal mode if Docker is available.
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async terminal_commands.terminal_exit(update, context)[מקור]
Exit terminal mode.
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async terminal_commands.terminal_run_command(update, context)[מקור]
Run a command string inside the sandbox and send the output.
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async terminal_commands.terminal_command(update, context)[מקור]
/terminal command to enter terminal mode.
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- terminal_commands.setup_terminal_handlers(application)[מקור]
Register terminal conversation handlers and commands (disabled on Render).
- פרמטרים:
application (telegram.ext.Application)