These instructions assume you are on macOS or Linux. Windows users, good luck.
You will need the following installed:
- Docker
- Visual Studio Code to run the development container
- MongoDB running on the host machine or MongoDB Atlas.
- Clone the repository and open the folder in Visual Studio Code
- Install the Microsoft Remote Development plugin
- Make sure that Docker is running
- Open the Command Pallette (
CMD+Shift+P
orCTRL+Shift+P
) and run "Remote-Containers: Reopen In Container" - VSCode should build the Docker image and open it automatically; this may take a couple of minutes as it has to install some extensions as well.
- Set up the
.env
file as shown here. - Make sure the database is set up.
- Open the integrated terminal in VSCode and run the
bloo
command to start the bot with hot reload!
Note that if you make changes to the
Dockerfile
,.devcontainer.json
, or need to install a new requirement, you need to rebuild the Docker image. You can do this through the Command Pallette again, run "Remote-Containers: Rebuild Container".
You will need the following installed:
python3.9+
venv
(Python's virtualenv module)- MongoDB running on the host machine or MongoDB Atlas.
- Inside the root folder of the project, run
python3 -m venv venv/
source venv/bin/activate
pip3 install -r requirements.txt
- Set up the .env file as shown here.
- Make sure the database is set up.
python3 monitor.py
If not using Docker, you can change DB_HOST
to localhost
instead. host.docker.internal
works on macOS and Windows, on Linux you can use 172.17.0.1
.
Optionally, you can use MongoDB Atlas instead of a local Mongo server, or you can ask SlimShadyIAm on Discord for accesss to the shared test database. In that case, you use:
DB_CONNECTION_STRING=mongodb+srv://.....
instead of DB_HOST
and DB_PORT
.
BLOO_TOKEN="your token here"
MAIN_GUILD_ID=12345
OWNER_ID=12345
DB_HOST="host.docker.internal"
DB_PORT=27017