Client Commands: telegram-panel slash commands with Discord-style parameters

Lists the panel account's client commands as Telegram slash commands (hourly
refresh, cached on the device), shows their parameters while typing, runs
complete commands on the panel instead of sending them and shows the answer
as an "Only visible to you" message (latest 20 kept in memory). Holding send
offers Run / Send as message / Send response in chat (red ! badge); an
answer's menu starts with Send in chat. Other plugins register their own
commands through the client_commands library module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lyuksovannyyandClaude Opus 5.5 committed 2026-10-09 16:19:20 +02:00
1 parent 84bdc44a76
commit 46a1f6ee1f
29 files changed
+3293 -220

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
"""Setting keys, defaults and constants."""
SERVER_URL = "server_url"
API_TOKENS = "api_tokens"
SEND_TO_CHAT = "send_to_chat"
SERVER_COMMANDS = "server_commands"
SHOW_PARAMS = "show_params"
DEFAULTS = {
SERVER_URL: "",
API_TOKENS: "",
SEND_TO_CHAT: False,
SERVER_COMMANDS: True,
SHOW_PARAMS: True,
}
# The panel's list of an account's commands is asked for again after this
# long (the server may say otherwise in `refresh_seconds`).
REFRESH_SECONDS = 3600
# A failed refresh is retried sooner.
RETRY_SECONDS = 300
HTTP_TIMEOUT_SECONDS = 15
# Running a command may take a while on the server (it times out at 60 s).
EXECUTE_TIMEOUT_SECONDS = 75