All input welcomed! Below are some of the basic steps to contribute to this project. Please read all of it to make sure you stay consistent with everybody else.
Please review the issues tab and self-assign one if you want to try to help in those. This keeps the efforts tidy and we know who is working on what.
If you don't have it already, install/setup Git on your machine.
- In the main page of the repo, notice the big green button that says "Code". Click it.
- Using the HTTPS or SSH option, copy the URL.
- If you are using HTTPS, using Git Bash/Terminal/Bash, navigate to the folder where you want this repo to be located in your machine and use:
$ git clone pasteURLYouJustCopied
- If you are using SSH, follow this GitHub tutorial.
- Install Node.js; it can be downloaded from here. Version 16.6 or higher is required.
- On the command line, navigate to the cloned repo.
- Use the following command to install all necessary packages:
$ npm install
- The cloned repo includes a file named sample.env which contains a list of the environmental variables required to run this application. Create a new filed named .env. Copy the contents of sample.env your .env file. Several of these variables need to be kept secret so the .env is not commited to GitHub.
- Replace the sample values for the environmental variables in the .env file with values you obtain from the Discord Developer Portal, your local database connection, and Discord IDs associated with roles and channels in a Discord server. The instructions below describe how the variable values are obtained.
Visit our wiki page for detailed instructions on getting your local database set up for testing and development.
- Head to the Applications section of the Discord Developer Portal and create a new application.
- Navigate to the Bot section and click "Add Bot". You can add an icon and name for your bot.
- Copy the bot token and paste it into the
DISCORD_SECRET_KEY
field in your.env
file. - Navigate to the OAuth2 section, then to the URL Generator subsection.
- Check the bot and applications.commands checkboxes under Scopes, and grant your bot the required permissions under Bot Permissions.
- Copy the URL under Scopes, paste it into your browser, and add your bot into your desired server.
- Find the
CLIENT_ID
on the Discord Developer portal OAuth2 page and copy in into your .env file. - Enter the
GUILD_ID
in the .env. You can find it by right-clicking on your Discord server's name and selecting Copy ID. - Enter the
ID_ADMIN
,ID_CODE_COUNSELOR
,ID_MODERATOR
,ID_SUPER_ADMIN
values into the .env. They can be found by right-clicking on the name of each role in your server's role settings and selecting Copy ID. - Enter the
BOT_ERROR_CHANNEL_ID
variable. In the development Discord server, you can get the ID for the the #bot-errors channel by right-clicking on the channel and selecting Copy ID. - You should now be able to see the bot in your server (it will appear Offline).
- Navigate to your local repo and enter the following command which deploys the Discord application commands. This script will also need to be run after any modifications are made to the code for the commands:
npm run deploy-commands
- Enter the following command into your terminal:
$ npm start
- Your bot should now appear Online in your server.
For information about our pre-commit hook and setting up your local environment to use ESLint, Prettier and Git Blame, check out the Advanced Setup page of our wiki.
We use a typical Git branching workflow. If you are new to Git and GitHub, visit our Git Workflow wiki page for a quick-start guide!
Please use Github's Issues. Report a bug or request a feature there. Please do:
- Use an appropriate label for the issue. If you think the current labels don't apply, create a new one
- Don't forget to add your issue to the project Kanban board
- If it is a bug: describe the bug and how to reproduce it
- If it is a feature request: explain the idea, how you think it could be done and what need it is addressing