How to build a Telegram sports scores bot
By the Botable team
A Telegram sports bot follows the teams you choose, posts goals and results as they happen, and lists upcoming fixtures. Describe your teams and how noisy you want it, and Botable builds the polling and the alerts.
What is a sports scores bot?
A Telegram sports scores bot is a polling loop with strong opinions about when to speak. Between matches there is nothing to say and it should say nothing; during a match, events arrive in bursts and each one is worth a message; after full time, one result summary replaces the lot. Getting that rhythm right is most of the work, and it is why a naive implementation that polls every minute regardless is both expensive and annoying. Two details cause most of the bugs. Match events get revised — a goal is disallowed, a scorer is corrected — so a bot that posts immutably will contradict itself, and editing the original message is better than sending a correction. And kick-off times arrive in the source's timezone, which means a fixture list is wrong for most of its readers unless each user's timezone is stored and applied.
What commands does it have?
| Command | What it does |
|---|---|
/follow <team> | Subscribes to a team's matches |
/today | Today's fixtures for followed teams |
/live | Current score in any match in progress |
/table | League standings |
/quiet | Results only, no live events |
What do you need before you start?
- A Telegram bot token from @BotFather
- A sports data source covering the leagues you care about
- A decision: live event-by-event, or results only
How do you build it?
How often should it poll?
Adaptively. Every minute or two while a followed match is in progress, and hourly or less otherwise. Ask for this explicitly — a fixed short interval burns your data quota overnight when nothing is happening and is the main reason these bots hit rate limits.
How do you handle a disallowed goal?
By editing the message you already sent rather than posting a correction. Events genuinely get revised, and a chat full of "actually, no" messages reads worse than a scoreline that quietly becomes right.
How do you keep it from being unbearable in a group?
Offer a quiet mode that posts only kick-off and full-time, and make it the default in groups. Event-by-event commentary is what one person wants and what a twenty-person group mutes.
Why do fixture times need timezones?
Because the data source reports kick-off in its own zone, and most of your readers are not in it. Store a timezone per user and render every time in theirs — a fixture list that is silently three hours out is worse than no fixture list.
A prompt you can use as-is
Paste this into Botable and adjust the details. It is specific on purpose — a vague description produces a vague bot.
Build a sports scores bot. /follow <team> subscribes, /unfollow removes. While a followed match is in progress poll every 90 seconds and post kick-off, goals with scorer, red cards and full time; otherwise poll hourly. If an event is later revised, edit the message you already sent rather than posting a correction. /quiet switches a chat to kick-off and full-time only, and is the default in groups. /today lists fixtures for followed teams in each user's own timezone, which you should ask for once. /table shows the league standings.
Who is this bot for?
- Supporter groups that want the score without a second app
- Fantasy league chats tracking several teams at once
- Anyone following a league in an inconvenient timezone
What goes wrong with this kind of bot?
- Fixed-interval polling wastes quota all night and rate-limits during matches
- Posting corrections instead of editing turns a chat into a contradiction log
- Event-by-event mode in a group is the fastest route to being muted
Questions about sports scores bots
Can it cover more than one sport?
Yes, if your data source does. The event model differs per sport — goals, wickets, touchdowns — so describe which sports matter and what counts as an event worth a message in each.
Can it post to a channel?
Yes. Make the bot a channel admin and point the output there. Channels suit a single team's match thread; groups suit chat around the score.