Add admin controls for selected user params and user note enrichment

Agent-Logs-Url: https://github.com/kr0sh512/tt-simple/sessions/34c3052e-7b55-4cb8-9fee-0ee1ba315691

Co-authored-by: kr0sh512 <46405586+kr0sh512@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-21 12:04:51 +00:00
committed by GitHub
co-authored by kr0sh512
parent 6aa9f71ff6
commit 7da7b95e8b
2 changed files with 242 additions and 8 deletions
+9
View File
@@ -13,9 +13,11 @@ Async Telegram bot for selling and extending Marzban VPN subscriptions.
- `data_limit_reset_strategy = month`
- `proxies = {"vless": {"flow": "xtls-rprx-vision"}}`
- `inbounds = {"vless": ["VLESS TCP REALITY"]}`
- `note` containing Telegram first name, last name, and phone (if available)
- If user has active subscription, a new purchase extends from current expiration.
- Bot sends **subscription URL** after successful purchase.
- Admin notifications for every creation/extension.
- Per-user price multiplier support (`price_multiplier`) that affects invoice stars (final amount is always integer).
- `/stats` command for admins:
- payments count
- stars earned
@@ -23,6 +25,13 @@ Async Telegram bot for selling and extending Marzban VPN subscriptions.
- marzban users
- traffic usage/total quota
## Admin user management
- `/select_user <username|telegram_id>` — select user for further updates and show current values.
- `/selected_user` — show the currently selected user and current values.
- `/set_expire <YYYY-MM-DD or ISO datetime>` — set selected user expiration (UTC).
- `/set_traffic <GB>` — set selected user monthly traffic limit in GB.
- `/set_multiplier <float>` — set selected user price multiplier.
## Setup
```bash
python -m venv .venv