LoL Game Tracker Bot

A Discord bot that tracks League of Legends players and automatically posts detailed game stats whenever they finish a match. Track your friends, follow pros, or keep tabs on your own performance with rich Discord embeds showing KDA, damage, items, runes, and rank changes.

Features

Automatic Game Detection

Polls the Riot API to detect when tracked players finish games and posts results automatically.

Detailed Stats

Shows KDA, CS, damage, gold, vision score, items, runes, and current rank with LP changes.

Multi-Player Tracking

Track multiple players per server. Add or remove players anytime with simple slash commands.

Rich Embeds

Beautiful Discord embeds with champion icons, color-coded win/loss, and organized stat fields.

Example Embed

Faker - Ahri (Victory)
KDA 12/3/8 (6.67 KDA)
CS 287 (8.2/min)
Damage 32.4k
Gold 14.2k
Vision 42
Duration 35:12
Rank CHALLENGER I (1248 LP) (+18 LP)

Commands

CommandDescription
/track add <riot_id>Add a player to track (e.g., Faker#KR1)
/track remove <riot_id>Stop tracking a player
/track listShow all tracked players in this server
/setchannel <channel>Set where game results are posted
/lookup <riot_id> [games] [compact]Look up match history with full stats, team details, and clickable OP.GG links

Setup

After inviting the bot to your server, use /setchannel to pick a channel for game updates. Then add players with /track add PlayerName#TAG. The bot will automatically post when any tracked player finishes a game.

Note: The bot checks for new games every 90 seconds. The first game after adding a player won't be posted (it's used to initialize tracking). Games completed after that will show up.

Tech Stack

Built with TypeScript, discord.js v14, and the Riot Games API. Uses Match v5 for game history, League v4 for rank data, and Data Dragon CDN for champion and item icons. Persists tracked players to JSON for simplicity. Hosted on a Node.js VPS.