feat: full bot redesign with inline keyboards, callback routing, Vienna timezone\n\n- Two global commands only: /start (main menu), /admin (admin panel)\n- Inline keyboard UI with action buttons per keyword card\n- Add flow: keyword text → confirmation Yes/No → edits message\n- Edit submenu: change name (in-place) or interval (presets + custom)\n- Toggle active/inactive, remove with confirmation\n- Stats formatted inline\n- All times shown in Vienna timezone (Europe/Vienna)\n- Message editing with fallback to new message on 24h limit\n- Removed all old text commands: /add, /list, /delete, /interval, /stats\n- Updated README with new UI documentation
This commit is contained in:
@@ -95,22 +95,36 @@ Edit `.env` before first startup. All values are read by the worker and database
|
||||
| meta | supabase/postgres-meta:v0.84.2 | — | Database metadata service |
|
||||
| worker | (built from ./worker) | — | Scraper + Telegram bot |
|
||||
|
||||
## Telegram Commands
|
||||
## Telegram Bot UI
|
||||
|
||||
All users must be whitelisted before use. Run `/start` to activate your account.
|
||||
All users must be whitelisted before use. The bot uses **inline keyboards** (buttons) instead of text commands for a clean experience. Times are shown in **Vienna timezone**.
|
||||
|
||||
### Commands (global menu, appears when you type `/`)
|
||||
|
||||
| Command | Access | Description |
|
||||
|------------------------------------|-------------|--------------------------------------------------|
|
||||
| `/start` | Anyone | Activate account and show help message |
|
||||
| `/add <keyword>` | Active user | Subscribe to keyword (shared across users) |
|
||||
| `/list` | Active user | List your subscriptions with subscriber counts |
|
||||
| `/delete <keyword_id>` | Active user | Unsubscribe from a keyword |
|
||||
| `/interval <keyword_id> <minutes>` | Active user | Change scrape interval (1-1440 min) |
|
||||
| `/stats` | Active user | Show keywords, ads tracked, notifications |
|
||||
| `/adduser <id> [admin]` | Admin only | Add or promote a user by Telegram ID |
|
||||
| `/removeuser <id>` | Admin only | Remove a user from the bot |
|
||||
| `/users` | Admin only | List all registered users and their roles |
|
||||
|---------|--------|-------------|
|
||||
| `/start` | Anyone | Open main menu |
|
||||
| `/admin` | Admin only | Open admin panel |
|
||||
|
||||
### Main Menu (`/start`)
|
||||
|
||||
Tap one of the buttons:
|
||||
|
||||
- **➕ Add Keyword** → Bot asks for keyword text → Shows confirmation with Yes/No
|
||||
- **📋 My Keywords** → Sends a formatted card per keyword with status, interval (Vienna tz), last scrape, subscriber count. Each card has action buttons:
|
||||
- `⏸ Stop` / `▶ Start` — Toggle active state
|
||||
- `✏️ Edit` — Submenu to change name or interval
|
||||
- Change Name: type new name → confirm Yes/No → in-place update
|
||||
- Change Interval: preset buttons (1m, 3m, 5m, 10m, 30m, 60m) or ⌨️ Custom
|
||||
- `🗑 Remove` — Confirm Yes/No → deletes subscription
|
||||
- **📊 Stats** — Keywords count, ads indexed, notifications sent
|
||||
|
||||
### Admin Panel (`/admin`)
|
||||
|
||||
- **➕ Add User** — Enter Telegram ID → adds user
|
||||
- **👥 List Users** — Shows all users with status icons and admin badges
|
||||
- **🗑 Remove User** — Enter Telegram ID → removes user
|
||||
|
||||
## Default Admin
|
||||
|
||||
On first boot, Telegram ID `298181113` is seeded as an admin user. Add additional admins via `/adduser <telegram_id> admin`.
|
||||
On first boot, Telegram ID `298181113` is seeded as an admin user. Add additional admins via the `/admin` panel.
|
||||
|
||||
+638
-326
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user