In-chat .rt commands¶
Raito registers a set of built-in developer commands. They use the .rt
prefix (a dot, rt and a space) instead of / and are hidden from the
Telegram slash menu — you invoke them by typing them in the chat.
Every command is gated by a role. The user must hold one of the listed roles
(or be a configured developer).
Router management¶
Command |
Roles |
Description |
|---|---|---|
|
DEVELOPER |
Paginated list of all built-in commands. |
|
DEVELOPER |
Render the router tree with load status. |
|
DEVELOPER |
Load a router by name (e.g. an |
|
DEVELOPER |
Unload a router. |
|
DEVELOPER |
Reload a router. |
Roles¶
Command |
Roles |
Description |
|---|---|---|
|
DEVELOPER · OWNER · ADMINISTRATOR |
Open a role picker, then assign to a user ID. |
|
DEVELOPER · OWNER · ADMINISTRATOR |
Alias of |
|
DEVELOPER · OWNER · ADMINISTRATOR |
Remove a user’s role. |
|
DEVELOPER · OWNER · ADMINISTRATOR |
Tree of all users grouped by role. |
System¶
Command |
Roles |
Description |
|---|---|---|
|
DEVELOPER |
Process CPU, memory and uptime. |
|
DEVELOPER |
Execute arbitrary Python in the bot’s context. |
|
DEVELOPER |
Execute a shell command on the host. |
Danger
.rt eval and .rt bash are unsandboxed remote code execution. They do
nothing unless the bot was started with
Raito(..., enable_dangerous_commands=True), and even then only the
developer role can run them. Leave the flag off in production.
Note
The eval context exposes helpers prefixed with _: _msg, _user,
_raito, _bot, _state and _command.