Community Discord Bot

General Bot Information

This is a general purpose bot built to improve the nexus community discord servers. Most of its functionality can be used in any discord server, with a few exceptions to features.


Database Integration:
  • Connectivity: The bot has a robust multithreaded database connector that has connection pools that different queries can get connections from to use for execution. These connections are returned back to the connection pools when the queries are done executing to free up memory and to keep track of the connections going in and out of the connector.
  • Banning/Kicking/Muting users: At the current moment this is only in discord. In-game integration will come in the future. Moderators+ will have the ability to use a general punishment command. The command includes the type of punishment to deal out, the person to punish, the reason for the punishment and if they want the user to receive a copy of the report. By default the command that's ran by the staff member will be hidden from view.
  • Clearing punishments: The bot also comes with the opposite of the punish command. Using the clear command can remove or reverse a punishment given to a user depending on what kind it was.
  • Reposting System: The bot currently has a very basic reporting system that anyone can use to submit a report about another user that's in the discord server.
Game Servers:
  • Game Server API: The bot is equipped with a REST API that currently runs on both Lostplains RP and Andromeda RP. The API currently has access to the server status information. More will be done in the future, including moderation features.
  • Permission Management: At the current moment, the bot has a system that utilizes Discord Role IDs to assign specific permission levels. There is also a system that utilizes the Discord Permissions that a user has access to on a given server. The users highest given permission granted in the given server is taken as their permission level that gets assigned to them.
  • This includes anything from basic moderation permissions such as: kicking, banning, muting, moving, etc... all the way to being a server administrator.
  • There are multiple levels of permissions granted at the moment that range between 5 different stages. These levels include: Regular Users, Support Staff, Moderators, Administrators and Owners.
Task & Thread Management:
  • Tasks: There is a fairly simple task system in place that can run functions on timers using the ScheduledExecutorService class. Each task can have an initial delay, a cycle to run the given task at and the unit of time for the cycles.
  • Threads: The Thread Manager that's built in to the bot currently runs 3 separate threads. There's one for the Repositories, the Message Creation Listener and the Server Join Listener. This allows the bot to fully start up and connect to discord without having to wait for all the repositories to finish initializing.

This is done because the Interaction Command registration with discord is rate limited to roughly 5 commands roughly every 10 seconds.

  • The Repository Manager handles access, registration, saving and lookups for all the different Event implementations that are done in the bot. This includes everything from Commands, MySQL Queries, Tasks and Total Class Counting.
  • The Repository Manager includes features that allow one to directly access any registered Event and it's inner functions my returning it as a class.
  • The biggest feature of the Repository Manager is the ability to reload any and or all Events while the bot is already running. This allows someone to replace, edit or even add new Events while the bot is running. Kind of like a plugin system.
User & Server Management:
  • The bot stores and updates data from servers such as their name and id to keep track of the channels that have been enabled for the punishment and reporting features. This allows server administrators to toggle which channel they want specific command logs to be sent to. This can be changed or removed as desired.
  • The bot also stores some user data to keep track of punishments. This includes their discord tag and discord id. This data is periodically updated if there happens to be a change to any of it.
Interaction Commands:

The bot is built around discords new Interactive Command feature. Most, if not all the commands are done this way to make it easier for people to figure out how all the different commands and features of the bot are used.

In the near future, all traditional command structures using chat prefixes will be removed.