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:
2026-06-17 11:46:57 +02:00
parent 40230d14fc
commit f25ff56bab
2 changed files with 694 additions and 368 deletions
+28 -14
View File
@@ -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 | | meta | supabase/postgres-meta:v0.84.2 | — | Database metadata service |
| worker | (built from ./worker) | — | Scraper + Telegram bot | | 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**.
| Command | Access | Description | ### Commands (global menu, appears when you type `/`)
|------------------------------------|-------------|--------------------------------------------------|
| `/start` | Anyone | Activate account and show help message | | Command | Access | Description |
| `/add <keyword>` | Active user | Subscribe to keyword (shared across users) | |---------|--------|-------------|
| `/list` | Active user | List your subscriptions with subscriber counts | | `/start` | Anyone | Open main menu |
| `/delete <keyword_id>` | Active user | Unsubscribe from a keyword | | `/admin` | Admin only | Open admin panel |
| `/interval <keyword_id> <minutes>` | Active user | Change scrape interval (1-1440 min) |
| `/stats` | Active user | Show keywords, ads tracked, notifications | ### Main Menu (`/start`)
| `/adduser <id> [admin]` | Admin only | Add or promote a user by Telegram ID |
| `/removeuser <id>` | Admin only | Remove a user from the bot | Tap one of the buttons:
| `/users` | Admin only | List all registered users and their roles |
- ** 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 ## 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.
+666 -354
View File
File diff suppressed because it is too large Load Diff