This repo is for a Discord bot built with the discord.js and discord.js-commando libraries.
The main purpose of this bot is to matchmake discord users to different games. Which means that the bot must:
- Register players to games
- Allocate players randomly to voice channels dedicated to a specific game
- Then new allocations can be generated such that players won't play the same game again
- The allocations must be valid and fun (No 2 players playing a game meant to be played with 10)
The base of the bot has been created and you are free to add whatever you want. (Just don't break anything and don't create crazy merge conflicts!)
To start contributing it is recommended to understand the following material:
Both of the libraries have good documentation available here.
Step by step instructions to run the bot can be seen in the Wiki!
The bot is run using node.js - also deals with the dependencies specified in package.json. The GitHub token should be stored in a .env file which use is described here.
To save settings after the bot being shutdown all of the data is stored using the Commando.Provider class to manipulate a SQLite database. The database itself is stored in the my_data.db file which can be viewed in various ways. (You can look it up! I use DB Browser)
Below you can find the short version. For a longer discussion check out the Wiki!
- The users get invited to a channel (Ideally created by the bot - based on some configuration).
- Once joined the channel they should register in various ways.
- The users only see general/announcement/registration/introduction text channels and 1 general voice channel they can interact with.
- On the day registrations get confirmed by some sign-in mechanism.
- Then after allocation guests see more channels (text & voice) for different teams and instructions (done with role with different permissions).
For ice breakers the bot can facilitate bunch of other sillyness
If everything is done perfectly the admins don't have to do anything and everything is automated by the bot. Kind of "just press next slide".
To get inspiration the existing code and commits can be looked at (and the workflow to follow!) or other open source projects can be found on the interwebs.