⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Added a /ping command to check if bot is active at the moment (#729)#730

Open
Luquitasjeffrey wants to merge 1 commit intomainfrom
issue729
Open

Added a /ping command to check if bot is active at the moment (#729)#730
Luquitasjeffrey wants to merge 1 commit intomainfrom
issue729

Conversation

@Luquitasjeffrey
Copy link
Collaborator

@Luquitasjeffrey Luquitasjeffrey commented Jan 30, 2026

It adds a /ping command to check if the bot is responding messages

Solves #729

Summary by CodeRabbit

  • New Features
    • Added a new /ping command to the bot. When invoked, the bot responds with "pong".

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 30, 2026

Walkthrough

A 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

Cohort / File(s) Summary
Ping Command Handler
bot/start.ts
Added /ping command handler that responds with "pong" and includes error handling following existing patterns.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

Hoppy bot now hears the call,
"Ping!" it squeaks through the hall,
"Pong!" replies with glee,
Eight lines of harmony, 🐰
A command bouncing, light and small!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately describes the main change: adding a /ping command to check bot activity, which matches the changeset that adds a ping command handler.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue729

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant