A Discord bot that tracks League of Legends ranked solo/duo games for configured summoners and posts match summaries to a Discord webhook.
- Polls the Riot API on a configurable interval
- Tracks ranked solo/duo matches only
- Skips remakes and incomplete games
- Posts kill/death timelines and multi-kill highlights to Discord
- Deduplicates matches via SQLite so the same game is never posted twice
- Riot API key
- Discord webhook URL
- Docker (for production)
- Rust (for local development)
| Variable | Description | Default |
|---|---|---|
API_KEY |
Riot Games API key | required |
DISCORD_WEBHOOK_URL |
Discord webhook URL | required |
DB_PATH |
Path to SQLite database file | required |
SUMMONERS_PATH |
Path to summoners JSON file | data/summoners.json |
POLL_INTERVAL_SECONDS |
How often to scan in seconds | 60 |
Create a .env file in the project root:
API_KEY=<your-riot-api-key>
POLL_INTERVAL_SECONDS=<number-of-seconds-to-wait-between-polls>
DISCORD_WEBHOOK_URL=<your-discord-webhook-url>
DB_PATH=<your-database-file-path>
SUMMONERS_PATH=<your-summoners-file-path>
Create data/summoners.json:
{
"summoners": [
{
"name": "SummonerName",
"puuid": "your-puuid-here",
"platform": "EUW1"
}
]
}Valid platform values: NA1, EUW1, EUN1, KR, BR1, JP1, LA1, LA2, OC1, TR1, RU
To find a summoner's PUUID you can use the Riot API directly:
GET https://europe.api.riotgames.com/riot/account/v1/accounts/by-riot-id/{gameName}/{tagLine}
# Clone the repository
git clone https://github.com/agonyz/league-tracker-rust
cd league-tracker-rust
# Copy and fill in environment variables
cp .env.example .env
# Create summoners file
cp data/summoners.example.json data/summoners.json
# Run
cargo rundocker compose up -ddocker build \
--build-arg USER_ID=$(id -u) \
--build-arg GROUP_ID=$(id -g) \
-t league-tracker-rust .
docker run --env-file .env -v ./data:/data league-tracker-rust