Skillbot is a Discord bot capable of calculating ratings for games with two teams. Skillbot will store all your players and match history neatly in a Postgres database.
In short, you:
- Setup a Discord bot in the Discord developer portal
- Setup a Postgres database
- Run the Skillbot process
- Start adding players and calculating match results
- Download the source code for Skillbot via
git clone
or by downloading this repository as a ZIP file - Head over to the Discord developer portal and click new application
- Click on the "Bot" tab, and add a bot to your application
- Add an icon for the bot if you wish
- Under the OAuth tab, select the "bot" checkbox then scroll down and select the "Administrator" checkbox
- Copy the URL and paste it into a new tab in your web browser, you should be able to invite the bot now
- Back at the bot tab, click on the blue copy button to copy the bot token
- Create a new file called
.env
in top level directory of the Skillbot source tree, populate the file with the following line:DISCORD_BOT_TOKEN=<your-bot-token-goes-here>
- Set up a Postgres database somewhere, ElephantSQL is a good free provider
- Build the bot JAR file by running
mvn package
in the root directory - Run the bot using the following command:
SPRING_DATASOURCE_HIKARI_CONNECTIONTIMEOUT=20000 \
SPRING_DATASOURCE_HIKARI_MAXIMUMPOOLSIZE=5 \
SPRING_DATASOURCE_URL=jdbc:<your-database-url-goes-here> \
SPRING_DATASOURCE_USERNAME=<your-database-username-goes-here> \
SPRING_DATASOURCE_PASSWORD=<your-database-password-goes-here> \
java -jar target/skillbot*.jar
- If everything was successful, you should see the bot come online in your Discord server
- Create a
#skillbot
channel for your bot commands and a#leaderboard
channel for a public leaderboard - All good to go!
The main commands are:
;create-player <name> <discord-id>
to create a new player;match *<winner>* <loser>
to process a match between<winner>
and<loser>
, updating their ratings;undo-match
to go back;post-leaderboard
to update your#leaderboard
channel
Run ;help
for more many more!
I'm no longer actively working on this project, but if you need a hand feel free to get in touch with me on my website.