A Discord bot that allows users to verify their League of Legends summoner name and assigns roles based on their rank/elo in the game. Users must initiate the verification process themselves, and upon successful verification, the bot will grant them the appropriate rank role within the Discord server.
Before you begin, ensure you have met the following requirements:
Install Node.js (v16.0 or higher) and NPM from Node.js official website.
Install Docker and Docker Compose on your server. Follow the official Docker guide for installation instructions.
Follow these steps to set up the bot for development purposes on your local machine:
git clone https://github.com/simwai/lol-ranks-bot.git
.cd lol-ranks-bot
.npm install
.config.json.example
and name it config.json
.config.json
.npm run-script start
.To deploy the bot on a server using Docker, follow these steps:
git clone https://github.com/simwai/lol-ranks-bot.git
.cd lol-ranks-bot
.config.json.example
and name it config.json
.config.json
.docker compose up -d
to build the Docker image and start the bot in detached mode.docker compose down
.To deploy the bot on a server using PM2, follow these steps:
npm install pm2 -g
.git clone https://github.com/simwai/lol-ranks-bot.git
.cd lol-ranks-bot
.npm install
.config.json.example
and name it config.json
.config.json
.pm2 start src/index.js --name lol-ranks-bot
.pm2 save
channels
= Set the ID of the channels that will be used for the Bot to send the messages (optional)
help
- Default channel to help members with bot-related issuesguildID
= ID of your server (Tutorial)
discordToken
= Tokens of your bot, used to authorize API requests and carry all of your bot user’s permissions (Tutorial)
riotToken
= Riot development API key (Tutorial)
status
= The Discord bot status
ranks
= The names of your rank roles on your Discord server
rankIconNames
= The names of you rank icons on your Discord server
region
= The LoL API endpoint region
timeZone
= Your timezone, you can find all timezones here
language
= Select your general language according to the filename inside the locales
folder (name only, no extension)
eloRoleLanguage
= Select your rank role language
verifiedRoleLanguage
= Select your verified role language
enableCronJob
= Enables automatic update of ranks every X
time, defined in cronTab
cronTab
= Defines how often the ranks will be updated if enableCronJob
is true
concurrentRequests
= Defines the number of concurrent requests to the API (See Rate Limits after login)
requestTime
= Set the request time in milliseconds
setVerifiedRole
= Sets the verified role, when somebody has got an elo role
enableVerification
= Enables summoner name verification
enableTierUpdateMessages
= Enable bot to send messages on configured channel for rank up/down
To enable rank icons on messages (like this ) you need to add custom emojis on your server (Tutorial)). The icons are inside the assets/img
folder (Please do not change the name of the icons or the bot will not be able to identify them)
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.