Contributing to Bot
This project is responsible for maintaining the Discord Bot in our Discord community. Our members and staff rely on it on a daily basis. It adds conveniences for our members when using the community, as well as being a core of our moderation toolkit.
The bot is built with
discord.py and has features relying on our site and snekbox projects.
- Python 3.7
- Docker CE
- Docker Compose
pip install docker-compose
pip install pipenv
You will need access to a copy of the git repository of your own that will allow you to edit the code and push your commits to. Creating a copy of a repository under your own account is called a fork.
This is where all your changes and commits will be pushed to, and from where your PRs will originate from.
For any Core Developers, since you have write permissions already to the original repository, you can just create a feature branch to push your commits to instead.
- Clone your fork to a local project directory
- Install the project's dependencies
- Prepare your hosts file (Optional)
You will need your own test server and bot account on Discord to test your changes to the bot.
Setup the listed Channels and Roles below in your test server.
#ot-offtopics (at least one)
#help-0 (at least one)
@Developers (to act as verified role, same as in-server)
You will need to copy IDs of the test Discord server, as well as the created channels and roles to paste in the config file. If you're not sure how to do this, check out the information over here.
- Create a copy of
- Go down to
guild:section and add the test guild ID.
- Change the channel and role IDs to match the ones in your test server.
- Create a webhook in each of
#big-brotherand copy the IDs for them into the config file also.
- Go down to
urls:section, and set
site: &DOMAIN "web:8000"
- In the same section, set
site_schema: &SCHEMA "http://"
- Setup the environmental variables listed in the section below.
To run the project, launch the project containers via docker-compose from your project directory.
If you're wanting to connect the bot to a local development
Site, you will need to:
1. Check the name of your
site project folder.
COMPOSE_PROJECT_NAME=sitefoldername to your bot's
.env file using lowercase for the folder name.
3. Start the
site project first using docker-compose.
4. Start the
bot project next using the following command:
docker-compose up --no-deps bot
Now that you have everything setup, it is finally time to make changes to the bot! If you have not yet read the contributing guidelines, now is a good time. Contributions that do not adhere to the guidelines may be rejected.
Notably, version control of our projects is done using Git and Github. It can be intimidating at first, so feel free to ask for any help in the server.