Skip to content

Telegram Bot (mmwX-tgbot)

You no longer need to download mmwX-tgbot, deploy a systemd/Docker service, maintain a config file, or add a separate Nginx proxy. The master starts, stops, and hot-restarts the Bot, while the Mini App is served at /tg-app under the master URL.

Open @BotFather in Telegram, send /newbot, follow the prompts, and save the resulting Bot Token.

Sign in to MiaoMiaoWu X as an administrator and open System Settings → TG Bot.

System Settings TG Bot tab screenshot

System Settings → TG Bot: enable switch, Bot Token, admin Telegram IDs, Mini App options and redeem-code copy text

Paste the Token from @BotFather. A saved Token is masked; leaving the mask unchanged preserves the existing Token.

Enter numeric Telegram IDs allowed to use /admin_* commands and Mini App administration. Separate multiple IDs with commas.

Turn on TGBot and save. The master automatically starts or hot-restarts the Bot; a Running status confirms success.

Send /start or /help to confirm the Bot responds, then open the Mini App from its menu. The master automatically serves it at /tg-app.

Read the complete System Settings guide →

  • /start <code> — Register / bind via redeem code
  • /me — My account info
  • /sub — Subscription link
  • /traffic — Traffic stats
  • /nodes — My nodes + online status
  • /notify — Notification toggle (on/off/status)
  • /unbind — Unbind TG (with confirmation)
  • /admin_invite list — List redeem codes
  • /admin_invite create — Generate redeem code interactively
  • /admin_invite revoke — Revoke redeem code
  • /admin_user <username> — Inspect a specific user

Only TG IDs in admin_tg_ids may use these. Rate-limited to 5/min.

After opt-in (/notify on) the bot pushes at 20:00 daily:

  • 📊 Today’s traffic summary
  • ⏰ Expiry reminders (7/3/1 days left)

The Mini App is now part of the master and automatically uses master URL + /tg-app. Telegram initData verifies users opened from the Bot menu, so they do not enter their MiaoMiaoWu X credentials again.

The “Telegram” column in the Users list has a “Bind” button that generates a /start <code> command; the user sends it to the Bot to link their Telegram. Admins can also generate redeem codes in the Bot for self-registration.

MiaomiaowuX Telegram Mini App admin screenshot

Admins see the global overview plus user / traffic / redemption-code management in the Mini App.

MiaomiaowuX Telegram Mini App user screenshot

Regular users see their own plan, used traffic, subscription URL and available nodes in the Mini App.

With the user portal on for the subscription domain, the Mini App is split by role into two pages:

  • User page: subscription domain/tg-app. The bot’s default menu button opens it, and it contains nothing admin-only.
  • Admin page: panel domain/tg-app/admin, served only on the panel domain. Telegram accounts configured as admins get their own menu button pointing here.

Opening the wrong page switches you to the right one for your role. The bot restarts automatically when the user-portal switch changes, so the menu buttons update. Without the user portal, both pages live under the master address.

The Bot Token controls your Bot and must remain secret. Mini App development preview permits initData in a URL and is only for local debugging; keep it disabled in production to prevent replay risks.

Confirm TGBot is enabled and reports Running, verify the Bot Token, and ensure the master can reach the Telegram API. Saving changes automatically restarts the Bot.

Administrator commands report no permission

Section titled “Administrator commands report no permission”

Confirm your numeric Telegram ID is listed under administrator Telegram IDs. Separate multiple IDs with commas, save, and retry.

Confirm the master uses a publicly reachable HTTPS domain and /tg-app is accessible. The legacy /app path, port 23088, and separate Nginx proxy are no longer needed.