Lineup Alerts
A bot for my fantasy football league's group chat. Before every kickoff it checks everyone's lineup and texts the group if someone is starting a player who's out, inactive or on a bye. It's open source, so any Sleeper league can set it up free.
- JavaScript
- Cloudflare Workers
- Cron jobs
- iPhone Shortcuts
- Sleeper & ESPN data
A mockup with made-up names and players.
Why I built it
I'm the commissioner of my league, and nothing ruins a week like losing to someone who forgot to bench an injured player. I wanted a heads-up to go out early enough to fix it, without anyone having to remember to check.
It only sends alerts. It never touches anyone's lineup and doesn't make rulings.
How it works
- Games that start at the same time form a window. Every 15 minutes a Cloudflare cron job checks whether a window is coming up and builds the message for only the starters playing in it.
- It flags anyone Out, Doubtful, on IR, on a bye, inactive on game day, or an empty lineup spot.
- The first window each game day gets an all-clear if everything's fine. Later windows only speak up when there's a new problem, and each problem is sent once.
- An iPhone Shortcut fetches the message 75 minutes before kickoff and sends it to the group text. When there's nothing to say, it sends nothing.
- In the fantasy playoffs it only checks teams still playing for the title, and it pauses itself when the season ends.
- 50 automated tests, plus a status page that shows what was built and delivered each game day, which is how I found and fixed a data source that was quietly failing.