Bloo
Setup instructions
These instructions assume you are on macOS or Linux. Windows users, good luck.
With Docker (recommended!)
You will need the following installed:
- Docker
- Visual Studio Code to run the development container
- MongoDB running on the host machine.
Steps
- 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".
Without Docker (not recommended)
You will need the following installed:
python3.9+
venv
(Python's virtualenv module)- MongoDB
Steps
- 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 main.py
.env
file
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
.
BLOO_TOKEN="your token here"
MAIN_GUILD_ID=12345
OWNER_ID=12345
DB_HOST="host.docker.internal"
DB_PORT=27017