This is a Discord bot that was originally made for my Wynncraft guild but has since been made publicly available. It reads various data from the public Wynncraft API and stores both raw and edited data into a database which the bot then uses to display information in command responses and update roles correctly.
It is technically split into two programs, one is the Discord bot that responds to user commands and performs certain actions on intervals. The other is the database populator which repeatedly calls the Wynncraft API to populate the database with various information.
The original bot was just to apply guild rank roles to members of the Discord server, so chiefs would get the @Chief role, recruits would get the @Recruit role etc. However as I looked more into what information the API offered I thought of other features could be added to the bot so I began work on various other features.
One of the first commands added after updating roles was the ability to track certain guilds to see how many players they have online on average. There is one command to add a guild to your tracked list, one to remove a guild and then the command to view the list.
In order to get more accurate guild activity, a command was added to view the active hours for any guild. This shows the average online players at each hour, with the option to sort by time or activity and display the info in a different timezone.
To help find inactive players in your guild a command to see the last login for each player was added, this shows if a player is online or when they last logged in.
A command to view the online members for a specific guild was also added, it will also display the active server if multiple members are on one world.
Some commands to view stats were also added. One for guilds, one for players and another that generated an image showing some player stats.
Another command was also added to determine the sus
level of a player, basically to try and find out if that player is an alt account or not.
Sometimes guilds or players can have the same identifiers, in those cases the bot will display the choices for you and you press a button in order to select the desired choice.
There are also many other commands for guild management to handle promotions and inactivity. These are all configured by the bots config commands and can be viewed by a command.
Originally the bot was written in Python but when I started to add more functionality I had to change to Java due to the server hosting not supporting a Python version that was required for slash commands.
Whilst the Java version was fine due to it being my strongest language, I decided to rewrite the bot in JavaScript and migrate to using SQLite instead of storing data in text files to improve the performance of the bot and allow for more features.
After some time, longstanding issues needed to be solved so I rewrote a large amount of the bot opting to use embeds for command responses instead of code blocks for everything allowing for a better appearance.
The GitHub repository for the new JavaScript bot is available here.
The GitHub repository for the old Java bot is available here.