feat(tgbot): rebuild the Telegram bot around editable screens and inline lists (#6760)

The bot answered every action with a new message, so a chat filled with stale
menus whose buttons still acted, and long client or inbound lists were paged
through dozens of buttons. Each chat now has one live screen that is edited in
place: the menu is grouped into Server, Clients, Traffic and Maintenance, lists
open through inline search, the add-client flow starts from a draft card, QR
codes arrive as one labelled sheet, and repeated notices collapse into one with
a counter. A client's /start and /usage show only that client's own links and
usage, groups are refused, and the settings page warns when the bot's inline
mode is off. Admin topics, the indexed Telegram lookup and every locale,
Slovak included, carry over.
This commit is contained in:
DIMFLIX
2026-10-24 13:39:56 +03:00
committed by GitHub
parent bc1b750e00
commit 15fee2a035
62 changed files with 7449 additions and 1945 deletions
+70
View File
@@ -4727,6 +4727,35 @@
],
"type": "object"
},
"TgBotCapabilities": {
"description": "TgBotCapabilities is the browser-safe shape of the bot's own capabilities.",
"properties": {
"groupPrivacy": {
"description": "GroupPrivacy off means the bot reads every group message; when it is on,\na bare /start in a group is invisible to the bot.",
"example": false,
"type": "boolean"
},
"inlineEnabled": {
"example": true,
"type": "boolean"
},
"running": {
"example": true,
"type": "boolean"
},
"username": {
"example": "xui_bot",
"type": "string"
}
},
"required": [
"groupPrivacy",
"inlineEnabled",
"running",
"username"
],
"type": "object"
},
"Traffic": {
"description": "Traffic represents network traffic statistics for Xray connections.\nIt tracks upload and download bytes for inbound or outbound traffic.",
"properties": {
@@ -13360,6 +13389,47 @@
}
}
},
"/panel/api/setting/tgBotCapabilities": {
"post": {
"tags": [
"Settings"
],
"summary": "Report what the configured bot can do. Inline mode is a BotFather switch, so the panel warns when it is off.",
"operationId": "post_panel_api_setting_tgBotCapabilities",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"msg": {
"type": "string"
},
"obj": {
"$ref": "#/components/schemas/TgBotCapabilities"
}
}
},
"example": {
"success": true,
"obj": {
"groupPrivacy": false,
"inlineEnabled": true,
"running": true,
"username": "xui_bot"
}
}
}
}
}
}
}
},
"/panel/api/setting/testDiscord": {
"post": {
"tags": [