A Discord bot that allows you to track your own League of Legends accounts and announces to the server when you have made a particular achievement. Currently the bot will announce the following events:
- Finishing a game with a KDA < 1
- Losing 3 or more games in a row
- A new announcement will be made per game
- Being demoted or premoted between ranks in ranked play (Solo or Flex)
- Overtaking another tracked player on a ranked leaderboard
- A special announcement is made when completing a milestone number of games
- A certificate image is generated and sent along with any other event embeds
After adding the bot to your server, first run /set_channel and choose where you want the announcements to be sent to. You can find the channel ID by right-clicking on a channel when you have Discord developer settings switched on.
Then use the /track command to start tracking your League summoner profiles. From now, when you make an achievement, the bot will send a message to your chosen channel.
If you want to be pinged when it makes an announcement related to you, use the /claim_profile command to link your discord name to the profile. To find the index of the profile, you can call the /list command.
/profile {player} {tag} - See your rank, mastery and favourite champs
/track {player} {tag} - Begin tracking achievements of this player
/untrack {index} - Stop tracking the player at this index in the list
/list {offset} - List all tracked players (15 at a time)
/claim_profile {index} - Links discord account to tracked player (Pings you when announcements involve you)
/unclaim_profile {index} - Unlinks discord account from tracked player
/who_claims {index} - Get list of users who have claimed an account
/set_channel {channel} {silent=false} - Set channel to which the announcements will be sent
/run_checks - Manually check for new announcements (This is done automatically every 5 minutes)
/leaderboard {mode} {view} {board} - Shows a leaderboard of the ranked users (See Leaderboard section for more info)
/track_many {users} - Bulk track multiple users (player#tag,player2#tag2...)
/rollback_memory {username} {games = 1} - Forgets a certain number of games for a particular user. (If username is not given, effect applies to all tracked users)
/autochecker status - Get information about the automatic checker
/autochecker pause - Pauses the automatic checker
/autochecker unpause - Unpauses the automatic checker
/autochecker start - Restarts the checker if it has shutdown due to an error
/export_memory - Returns the JSON file that represents all persistently stored data
| Board | Description | Notes |
|---|---|---|
| Rank | Shows the standard ranked leaderboard based on ranked matches during this split | |
| Games | Orders the server based on how many ranked games they have played this split | Only shows Text view currently |
Note: All boards work for both Solo/Duo and Flex rank modes.
Your can run this bot using Docker
docker compose up -dor local Python interpreter
pip install -r requirements.txt
python ./src/main.py.env file should be located in the root directory. Alternatively, you can use shell environment variables.
I recommend using Railway.app to host the bot, as the bot uses very little resources so easily fits into their generous trial tier. The configuration for persistent storage is already set up to be used with Railway Volume storage, but does also work for other generic hosting platforms.
This bot is not endorsed by Riot Games and does not reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games and all associated properties are trademarks or registered trademarks of Riot Games, Inc.