Added a /ping command to check if bot is active at the moment (#729)#730
Added a /ping command to check if bot is active at the moment (#729)#730Luquitasjeffrey wants to merge 1 commit intomainfrom
Conversation
WalkthroughA new ping command handler was added to the bot in bot/start.ts. The command responds with "pong" when invoked and includes error handling consistent with existing command patterns. No modifications were made to other commands or exported entities. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@bot/start.ts`:
- Around line 254-260: The /ping handler currently replies with hardcoded
'pong'; update the bot.command('ping', ...) handler to use the i18n helper by
calling ctx.i18n.t('ping_pong') when replying (replace direct ctx.reply('pong')
with ctx.reply(await ctx.i18n.t('ping_pong')) or equivalent), and add the key
"ping_pong": "pong" to the locale files (e.g., locales/en.json) so translations
are available; ensure you import/expect ctx to be typed as MainContext that has
i18n available and keep the existing error handling in the catch block.
It adds a /ping command to check if the bot is responding messages
Solves #729
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.