openclaw-cricket-live-scores
v1.0.0
Published
OpenClaw plugin for IPL and cricket live ball-by-ball subscriptions over chat channels.
Maintainers
Readme
OpenClaw Cricket Live Scores
An OpenClaw plugin that lets a user pick an IPL or cricket match and subscribe to live score pushes in the same WhatsApp or Telegram chat. The plugin sends a message for each detected new ball state and can add the latest available ball commentary on top of the live score update.
This plugin works without an external cricket API key. It scrapes public Cricbuzz match pages for live score snapshots and infers ball-by-ball updates by diffing consecutive score states.
What it does
/ipl matcheslists live and upcoming IPL matches./ipl score <number|matchId>returns the current score once./cricket matches [query]lists broader cricket matches and supports search by team or tournament./cricket score <number|matchId>returns the current score once./ipl subscribe <number|matchId> balls/ipl subscribe <number|matchId> commentary/cricket subscriptions/cricket unsubscribe <number|matchId|all>/cricket mode <number|matchId> balls|commentary
The subscription is bound to the current OpenClaw chat target, so updates go back into the same WhatsApp or Telegram conversation.
Mode behavior:
ballssends only the score update lines for the latest detected ball.commentarysends the same score update plus the latest scraped ball commentary text when Cricbuzz exposes it.- If polling misses intermediate balls, the plugin reports the latest known ball cleanly instead of sending a range-based snapshot summary.
Install
- Build the plugin:
npm install
npm run build- Link it into OpenClaw:
openclaw plugins install -l .
openclaw plugins enable cricket-live-scores- Make sure your channel is already logged in:
openclaw channels login --channel telegram
openclaw channels login --channel whatsappThe plugin uses OpenClaw's outbound text adapter, so it is channel-agnostic. If Telegram works and WhatsApp is linked correctly in OpenClaw, the same /ipl ... and /cricket ... commands work in WhatsApp too.
Optional config
Add this under plugins.entries.cricket-live-scores.config in your OpenClaw config if you want to tune the polling behavior:
{
"plugins": {
"entries": {
"cricket-live-scores": {
"enabled": true,
"config": {
"pollIntervalMs": 10000,
"preMatchPollIntervalMs": 45000,
"requestTimeoutMs": 12000,
"defaultQuery": "ipl"
}
}
}
}
}Commands
/ipl
/ipl matches
/ipl score 1
/ipl subscribe 1 balls
/ipl subscribe 1 commentary
/ipl subscriptions
/ipl unsubscribe 1
/cricket matches india
/cricket score 2
/cricket subscribe 2 commentary
/cricket mode 2 balls
/cricket subscriptions
/cricket unsubscribe allNotes
- Delivery is near-live, not a licensed official ball feed. Ball events are inferred from changes in the public live score snapshot.
/... scoreis the one-shot command./... subscribeis the continuous auto-push command.ballsmode does not append commentary text.- Commentary mode prefers the latest scraped Cricbuzz ball text when it is available. If Cricbuzz does not expose commentary for the latest poll, the plugin falls back to a short generated line.
- Numbered selections such as
1depend on a recent/ipl matchesor/cricket matchesresult. If that list is stale, run the match list command again or use the full matchId. - These slash commands are custom plugin commands, so they bypass the LLM. Gemini or Groq quota matters for general assistant chat, but not for the core
/iplor/cricketcommand handling in this plugin. - Always-on Telegram or WhatsApp delivery needs a continuously running OpenClaw gateway. That is a deployment concern outside the plugin code itself.
List of all available commands:
| Command | Example | Description |
|---------|---------|-------------|
| /ipl matches | /ipl matches | List live & upcoming IPL matches |
| /ipl matches [query] | /ipl matches mumbai | Search matches by team or keyword |
| /ipl score <n> | /ipl score 1 | One-shot current score for match #n |
| /ipl subscribe <n> balls | /ipl subscribe 1 balls | Subscribe to ball-by-ball updates |
| /ipl subscribe <n> commentary | /ipl subscribe 1 commentary | Subscribe with Cricbuzz commentary text |
| /ipl subscriptions | /ipl subscriptions | List your active subscriptions in this chat |
| /ipl unsubscribe <n> | /ipl unsubscribe 1 | Unsubscribe from match #n |
| /ipl unsubscribe all | /ipl unsubscribe all | Remove all subscriptions in this chat |
| /ipl mode <n> balls | /ipl mode 1 balls | Switch existing subscription to scores only |
| /ipl mode <n> commentary | /ipl mode 1 commentary | Switch existing subscription to include commentary |
| /ipl summary <n> | /ipl summary 1 | Detailed scorecard: batting, bowling, run rate, latest ball |
| /ipl quiet HH:MM-HH:MM | /ipl quiet 23:00-07:00 | Suppress notifications during this time window |
| /ipl quiet off | /ipl quiet off | Disable quiet hours |
| /ipl help | /ipl help | Show command reference |
| /cricket matches [query] | /cricket matches england | Same as /ipl but for all cricket worldwide |
Notes:
<n>= the number from the most recent/ipl matcheslist, or a raw matchId/cricketmirrors every/iplcommand — just replace the prefix- Subscriptions are per-chat — each WhatsApp/Telegram conversation has its own independent subscriptions
