feat(telegram): align global commands with send-only vision#605
Conversation
Signed-off-by: cryptodj413 <shinjirohara2@gmail.com>
📝 WalkthroughWalkthroughThe change adds command handling to the Telegram bot integration. A commandHandler function was created to process /start, /help, and /settings commands, with optional chat-specific filtering. The TelegramOutput struct adds a pollCancel field to manage the long-polling lifecycle. The bot now registers global commands during initialization and starts a polling goroutine. The Start method initializes polling and sets global commands while guarding against double-start. The Stop method cancels active polling before shutdown. Error logging was added for command registration failures. 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #492
Closes #493
Closes #494
Summary by cubic
Add Telegram global commands (/start, /help, /settings) with long polling, replying only in the configured chat to keep the bot send-only. Closes #492, #493, #494.
New Features
Refactors
Written for commit d4bb6c9. Summary will update on new commits.
Summary by CodeRabbit
Release Notes
/start,/help, and/settingscommands with proper handling and error logging.