Make sure you have the latest version of python3 installed on your computer. Before doing any development:
- Run
python3 -m venv venv/
- Run
source venv/bin/activate
- Run
pip install -r requirements.txt
- Create a file in the root directory called
.env
and add the following string to it:DISCORD_TOKEN={discord api token}
, where{discord api token}
should be replaced by the token provided in the server-development channel in the pinned message. - Install MongoDB for your platform using the instructions at https://www.mongodb.com/docs/manual/administration/install-community/.
- On the Discord server, ensure that there is a
Carpool Admin
role assigned to every user who should have the permissions to invoke carpool bot admin commands (these are all the commands with the-admin
suffix). This role should also be assigned to the bot itself. - Create an
Inactive
Discord server role for server members who will not be participating in the team for a given term. - Create three channels:
#carpool-scheduling
should be open to everyone, and will be the place where regular users can type their commands to the bot.#carpool-admin
should be open to those with theCarpool Admin
role, and will be the place where Carpool Admins can send their admin commands privately.#carpool-official
should be open to everyone, and will be where the bot posts the carpools. It may be useful to restrict posting in this channel to onlyCarpool Admin
s.
- Create a new database entry for yourself by running the discord command
!temp-reg-user
in any channel the Carpool Bot is a part of. You only need to do this once.
Before doing any development:
- Run
source venv/bin/activate
- Run the bot with the command
python3 src/main.py
and wait for a console message saying the bot has connected to discord.
See the following google doc for the requirements specification: Requirements Spec.