# Phase 9: Telegram Bot Management **Status**: Pending **Parent**: [primary-plan.md](primary-plan.md) --- ## Tasks ### 1. Register Telegram bots `[ ]` - New entity: TelegramBot (name, token, bot_username fetched via getMe) - CRUD API: /api/telegram-bots - Frontend page to manage bots ### 2. View active bot chats `[ ]` - Call Telegram getUpdates API to discover chats the bot has interacted with - Display chat list (id, title, type) per bot - Refresh on demand ### 3. Target uses registered bot + chat selector `[ ]` - Target form: select from registered bots (dropdown) instead of raw token - Select from discovered chats instead of typing chat_id manually - Keep backward-compatible raw input as fallback