Summary
Add /ping and /uptime Telegram commands mirroring the health information already exposed over HTTP at /healthz, so the team can check the bot's liveness from inside the chat instead of curling the deployed URL.
Background
src/index.ts already exposes app.get("/healthz", (_req, res) => res.status(200).send("ok")). There is no equivalent inside Telegram — src/telegram/client.ts only registers a new_chat_members handler. This is the cheapest possible extension of existing, already-verified functionality.
Proposed Solution
Add bot.command("ping", ...) returning a simple "pong" plus response latency, and bot.command("uptime", ...) returning process uptime since last start (process.uptime()), reusing the existing sendMessage helper.
Technical Scope
src/telegram/client.ts — two new bot.command(...) handlers
- No new dependencies, no new config
- Tests: command handler output format
Acceptance Criteria
Edge Cases
- Bot restarted moments before the command runs — uptime should read as near-zero, not error
- Command issued by a non-member in a group the bot isn't actually in (not applicable here, but worth a sanity check that command handlers don't assume group membership)
Risks
- None of significance — purely additive, no external dependencies, mirrors already-tested logic
Deliverables
- Feature implementation
- Unit tests
Labels
enhancement, backend, good first issue
Priority
Medium — trivial to build, directly useful once the bot has more moving parts (scheduler, commands) to worry about.
Estimated Completion: 96 hours
Telegram: https://t.me/txioCommunity
Summary
Add
/pingand/uptimeTelegram commands mirroring the health information already exposed over HTTP at/healthz, so the team can check the bot's liveness from inside the chat instead of curling the deployed URL.Background
src/index.tsalready exposesapp.get("/healthz", (_req, res) => res.status(200).send("ok")). There is no equivalent inside Telegram —src/telegram/client.tsonly registers anew_chat_membershandler. This is the cheapest possible extension of existing, already-verified functionality.Proposed Solution
Add
bot.command("ping", ...)returning a simple "pong" plus response latency, andbot.command("uptime", ...)returning process uptime since last start (process.uptime()), reusing the existingsendMessagehelper.Technical Scope
src/telegram/client.ts— two newbot.command(...)handlersAcceptance Criteria
/pingresponds with a liveness confirmation and round-trip latency/uptimeresponds with process uptime in a human-readable format/help(once issue Add release published notifications #4 lands) lists both commandsEdge Cases
Risks
Deliverables
Labels
enhancement, backend, good first issue
Priority
Medium — trivial to build, directly useful once the bot has more moving parts (scheduler, commands) to worry about.
Estimated Completion: 96 hours
Telegram: https://t.me/txioCommunity