I lead the LoL section at Pyry, the esports team at Politechnika Poznańska. We needed a way to track ranked progress across the roster and create some competitive pressure to grind. So I built a Discord bot that does it automatically.

What it does

The bot connects to the Riot API and maintains ranked leaderboards in Discord. Two background loops:

  1. Hourly leaderboard refresh - pulls current rank for every player, updates a pinned embed sorted by tier/division/LP. Shows winrate, W/L record, and LP change arrows.

  2. Match notifications (every 5 min) - posts a notification when someone finishes a ranked game. Champion, KDA, CS/min, duration, win or loss. Everyone sees everything.

The notifications are the part that actually matters. When your 0/7 Yasuo game gets posted in the team channel, you think twice before running it back.

Setup

Three commands and it runs on its own:

/leaderboard create team-ranked #lp-channel
/player add team-ranked PlayerName#EUW
/notifications setchannel team-ranked #match-feed

Supports multiple leaderboards per server (e.g. “team-ranked” and “top-laners”), each with its own notification channel. Match deduplication is per-leaderboard.

Stack

Python, discord.py, aiohttp for async Riot API calls, SQLite. Runs on my Raspberry Pi 5.

The free Riot API dev key expires every 24 hours, so for continuous use you need a production or personal key. Rate limits are tight (20 req/s regional, 100/2min account), so the bot adds delays between lookups. Old match records get cleaned up after 7 days.

Does it work?

Yes. Turns ranked from a solo thing into a team activity. Visible leaderboards create pressure to climb, match notifications add accountability. Exactly what an esports roster needs.

Source code: GitHub