mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5307] [Feature]: Suggestion to add functionality to the Telegram bot menu button. #3719
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3719
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zixu5u on GitHub (Jun 14, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5307
Is your feature request related to a problem?
It is recommended to add the following functions to the Telegram bot menu buttons:
/functions – Get detailed menu content
/status – Get system status
/restart – Restart the Xray service
/clearall – Clear traffic data for all nodes with one click
/help – Get further assistance
Describe the solution you'd like
It is recommended to add the following functions to the Telegram bot menu buttons:
/functions – Get detailed menu content
/status – Get system status
/restart – Restart the Xray service
/clearall – Clear traffic data for all nodes with one click
/help – Get further assistance
Alternatives you've considered
No response
Concrete use case
No response
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
No response
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jun 14, 2026):
Investigated the current source to clarify what already exists and what would be new work.
What is already implemented
/helpanswerCommand,tgbot_router.go:186)SetMyCommands,tgbot.go:282)/statustgbot_router.go:195)tgbot.go:284)/restarttgbot_router.go:219)SetMyCommands/clearall/functionsThe "reset all traffic" action already exists as an inline-keyboard button reachable from the admin keyboard (
tgbot_send.go:31, callback handlerreset_all_traffics_cattgbot_router.go:1437). It callsInboundService.ResetAllTraffics()and iterates viaClientService, which covers all nodes. There is no/clearalltext command that triggers the same flow.The
SetMyCommandscall that populates BotFather's "/" suggestion list is ininternal/web/service/tgbot/tgbot.go:280–287and currently registers only/start,/help,/status, and/id.What a PR would need to change
/restartinSetMyCommands(tgbot.go:280–287) — one-line addition; the handler already exists./clearallcommand handler inanswerCommand(tgbot_router.go) that (a) checksisAdmin, (b) sends a confirmation prompt, and (c) on confirmation callsinboundService.ResetAllTraffics(). The underlying service method is already present. Register the command inSetMyCommandsas well./functionsis functionally identical to the existing/helpcommand, which already returns the admin keyboard listing available actions. Merging the two or making/functionsan alias for/helpwould be the simplest path.A note on scope:
ResetAllTrafficsresets per-client counters, not node-level inbound traffic. The behaviour is the same as what "Clear All Traffic" does in the existing keyboard flow.A similar request was previously opened as #2665 (same author, now closed without resolution). If you are willing to submit a PR, the areas above are the minimum diff required.
This reply was generated automatically; a maintainer may follow up.