feat: add /help, /history, /uptime commands and enhance /status

- /help: detailed guide with examples for all commands
- /status: overall indicator, emoji markers, updated time, status page link
- /history [count]: recent incidents with impact, dates, links (max 10)
- /uptime: component health with last change time
- Split info commands into bot-info-commands.js for modularity
- Register all 7 commands in bot-setup.js
This commit is contained in:
2026-04-08 23:41:53 +07:00
parent 37c2a01677
commit 30ffaae612
6 changed files with 209 additions and 35 deletions

View File

@@ -38,7 +38,7 @@ Cloudflare Workers with two entry points exported from `src/index.js`:
1. **Statuspage → Worker**: Webhook POST → validate secret (timing-safe) → parse incident/component event → filter subscribers by preference → `sendBatch` to CF Queue
2. **Queue → Telegram**: Consumer processes batches of 30 → `sendMessage` via raw fetch → auto-removes blocked subscribers (403/400), retries on 429
3. **User → Bot**: Telegram webhook → grammY handles `/start`, `/stop`, `/status`, `/subscribe` commands → reads/writes KV
3. **User → Bot**: Telegram webhook → grammY handles `/help`, `/start`, `/stop`, `/status`, `/subscribe`, `/history`, `/uptime` commands → reads/writes KV
### KV Storage