[GH-ISSUE #5303] [Feature]: Recommendations for Telegram Bot Notification Formats #3712

Open
opened 2026-10-31 20:34:25 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @zixu5u on GitHub (Jun 14, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5303

Hello, The current format for scheduled notifications from Telegram bots isn't very good. It cannot display details for individual nodes.

Describe the solution you'd like

Hello, here are some suggestions for scheduled notifications in the Telegram bot. You can refer to the following format, which provides comprehensive and detailed information.
You can refer to this repository (https://github.com/FranzKafkaYu/x-ui) for reference. Thank you very much.

#English format example:
🔔 Status Notification 🔔
💻 Hostname: ip----
📣 IP Address: ...

✅ Xray Status: Running
🆔 Node Name: ********
🔗 Node Type: vmess
🎯 Node Port: *****
⏫ Upload Traffic ↑: ***.**MB
⏬ Download Traffic ↓: ***.**MB
📊 Total Traffic: ***.**MB
❄️ Traffic Limit: ***.**GB
⏰ Expiry Date: ♾️

🆔 Node Name: ********
🔗 Node Type: vmess
🎯 Node Port: *****
⏫ Upload Traffic ↑: ***.**MB
⏬ Download Traffic ↓: ***.**MB
📊 Total Traffic: ***.**MB
❄️ Traffic Limit: ***.**GB
⏰ Expiry Date: ♾️

🆔 Node Name: ********
🔗 Node Type: vmess
🎯 Node Port: *****
⏫ Upload Traffic ↑: *.**B
⏬ Download Traffic ↓: *.**B
📊 Total Traffic: *.**B
❄️ Traffic Limit: ***.**GB
⏰ Expiry Date: ♾️

#中文格式示例:
🔔状态通知🔔
💻主机名称:ip----
📣IP地址:...

✅xray状态:运行中
🆔节点名称:*******
🔗节点类型:vmess
🎯节点端口:****
⏫上行流量↑:***MB
⏬下行流量↓:***MB
📊整体流量:***MB
❄️流量限制:***GB
⏰到期时间:♾️

🆔节点名称:*******
🔗节点类型:vmess
🎯节点端口:****
⏫上行流量↑:***MB
⏬下行流量↓:***MB
📊整体流量:***MB
❄️流量限制:***GB
⏰到期时间:♾️

🆔节点名称:*******
🔗节点类型:vmess
🎯节点端口:****
⏫上行流量↑:***B
⏬下行流量↓:***B
📊整体流量:***B
❄️流量限制:***GB
⏰到期时间:♾️

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?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @zixu5u on GitHub (Jun 14, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5303 ### Is your feature request related to a problem? Hello, The current format for scheduled notifications from Telegram bots isn't very good. It cannot display details for individual nodes. ### Describe the solution you'd like Hello, here are some suggestions for scheduled notifications in the Telegram bot. You can refer to the following format, which provides comprehensive and detailed information. You can refer to this repository (https://github.com/FranzKafkaYu/x-ui) for reference. Thank you very much. #English format example: 🔔 Status Notification 🔔 💻 Hostname: ip---- 📣 IP Address: ... ✅ Xray Status: Running 🆔 Node Name: ******** 🔗 Node Type: vmess 🎯 Node Port: ***** ⏫ Upload Traffic ↑: ***.**MB ⏬ Download Traffic ↓: ***.**MB 📊 Total Traffic: ***.**MB ❄️ Traffic Limit: ***.**GB ⏰ Expiry Date: ♾️ 🆔 Node Name: ******** 🔗 Node Type: vmess 🎯 Node Port: ***** ⏫ Upload Traffic ↑: ***.**MB ⏬ Download Traffic ↓: ***.**MB 📊 Total Traffic: ***.**MB ❄️ Traffic Limit: ***.**GB ⏰ Expiry Date: ♾️ 🆔 Node Name: ******** 🔗 Node Type: vmess 🎯 Node Port: ***** ⏫ Upload Traffic ↑: *.**B ⏬ Download Traffic ↓: *.**B 📊 Total Traffic: *.**B ❄️ Traffic Limit: ***.**GB ⏰ Expiry Date: ♾️ #中文格式示例: 🔔状态通知🔔 💻主机名称:ip---- 📣IP地址:... ✅xray状态:运行中 🆔节点名称:******* 🔗节点类型:vmess 🎯节点端口:**** ⏫上行流量↑:***MB ⏬下行流量↓:***MB 📊整体流量:***MB ❄️流量限制:***GB ⏰到期时间:♾️ 🆔节点名称:******* 🔗节点类型:vmess 🎯节点端口:**** ⏫上行流量↑:***MB ⏬下行流量↓:***MB 📊整体流量:***MB ❄️流量限制:***GB ⏰到期时间:♾️ 🆔节点名称:******* 🔗节点类型:vmess 🎯节点端口:**** ⏫上行流量↑:***B ⏬下行流量↓:***B 📊整体流量:***B ❄️流量限制:***GB ⏰到期时间:♾️ ### 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? - [ ] I'd like to implement this feature myself and open a PR. - [x] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 14, 2026):

The request is valid and the data needed to implement it is already available in the codebase. Here is what the current scheduled report includes and what would need to change.

What SendReport() currently sends (internal/web/service/tgbot/tgbot_report.go):

  • A header with runtime schedule (tgbot.messages.report)
  • Server-level stats via prepareServerUsageInfo(): hostname, 3X-UI/Xray versions, IPv4/IPv6, uptime, system load, RAM, online client count, TCP/UDP connection count, aggregate network traffic, Xray state
  • Exhausted/near-depleted inbounds and clients (remark, port, traffic consumed, expiry date)
  • Optional database backup

There is no per-inbound breakdown in the scheduled report today. Per-inbound data is only available interactively via the "Get Inbounds" button, which calls getInboundUsages() (internal/web/service/tgbot/tgbot_inbound.go:19).

What exists and could be reused:

  • getInboundUsages() already formats inbound remark, port, upload/download/total traffic, client count, and expiry date for every inbound.
  • The inbound protocol type is stored in inbound.Protocol (see internal/database/model/model.go) and is not currently included in that output — it would need to be added.
  • Message templates for each field (tgbot.messages.inbound, port, traffic, expire, etc.) are already defined in internal/web/translation/en-US.json (and all 12 other locales).

Implementing this feature would primarily require:

  1. Adding inbound.Protocol to the output in getInboundUsages().
  2. Calling getInboundUsages() (or a variant of it) from SendReport() in tgbot_report.go.
  3. Optionally making this conditional (e.g., a setting toggle) to avoid very long messages on panels with many inbounds.

A PR contributor can use the "PR welcomed" label path. The getInboundUsages() function and the SendReport() integration point are both straightforward starting places.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:4700262319 --> @github-actions[bot] commented on GitHub (Jun 14, 2026): The request is valid and the data needed to implement it is already available in the codebase. Here is what the current scheduled report includes and what would need to change. **What `SendReport()` currently sends** (`internal/web/service/tgbot/tgbot_report.go`): - A header with runtime schedule (`tgbot.messages.report`) - Server-level stats via `prepareServerUsageInfo()`: hostname, 3X-UI/Xray versions, IPv4/IPv6, uptime, system load, RAM, online client count, TCP/UDP connection count, aggregate network traffic, Xray state - Exhausted/near-depleted inbounds and clients (remark, port, traffic consumed, expiry date) - Optional database backup There is **no per-inbound breakdown** in the scheduled report today. Per-inbound data is only available interactively via the "Get Inbounds" button, which calls `getInboundUsages()` (`internal/web/service/tgbot/tgbot_inbound.go:19`). **What exists and could be reused**: - `getInboundUsages()` already formats inbound remark, port, upload/download/total traffic, client count, and expiry date for every inbound. - The inbound protocol type is stored in `inbound.Protocol` (see `internal/database/model/model.go`) and is not currently included in that output — it would need to be added. - Message templates for each field (`tgbot.messages.inbound`, `port`, `traffic`, `expire`, etc.) are already defined in `internal/web/translation/en-US.json` (and all 12 other locales). **Implementing this feature** would primarily require: 1. Adding `inbound.Protocol` to the output in `getInboundUsages()`. 2. Calling `getInboundUsages()` (or a variant of it) from `SendReport()` in `tgbot_report.go`. 3. Optionally making this conditional (e.g., a setting toggle) to avoid very long messages on panels with many inbounds. A PR contributor can use the `"PR welcomed"` label path. The `getInboundUsages()` function and the `SendReport()` integration point are both straightforward starting places. *This reply was generated automatically; a maintainer may follow up.*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3712
No description provided.