Skip to content

Latest commit

 

History

History
99 lines (78 loc) · 5.11 KB

README.md

File metadata and controls

99 lines (78 loc) · 5.11 KB

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 or MongoDB Atlas.

Steps

  1. Clone the repository and open the folder in Visual Studio Code
  2. Install the Microsoft Remote Development plugin
  3. Make sure that Docker is running
  4. Open the Command Palette (CMD+Shift+P or CTRL+Shift+P) and run "Remote-Containers: Reopen In Container"
  5. 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.
  6. Set up the .env file as shown here.
  7. Make sure the database is set up.
  8. 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 Palette again, run "Remote-Containers: Rebuild Container".

Without Docker (not recommended)

You will need the following installed:

  • python3.9+
  • venv (Python's virtualenv module)
  • MongoDB running on the host machine or MongoDB Atlas.

Steps

  1. Inside the root folder of the project, run python3 -m venv venv/
  2. source venv/bin/activate
  3. pip3 install -r requirements.txt
  4. Set up the .env file as shown here.
  5. Make sure the database is set up.
  6. 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.

Optionally, you can use MongoDB Atlas instead of a local Mongo server, or you can ask SlimShadyIAm on Discord for access 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
AARON_ID=123 # ID of whoever owns the server

DB_HOST="host.docker.internal"
DB_PORT=27017

# this is optional, if you want ban appeal form support
BAN_APPEAL_URL=""
BAN_APPEAL_GUILD_ID=12345
BAN_APPEAL_MOD_ROLE=12345

# this is optional, set this for development
# (it's False by default for production)
DEV=True

# this is optional if you want logging to be sent to a Discord webhook
LOGGING_WEBHOOK_URL=""

# this is optional, for /sabbath command
AARON_ROLE=123

# used for automatically uploading tweak lists to paste.ee
PASTEE_TOKEN="your API key here"

# optional, for /neural_net meme command
RESNEXT_TOKEN="your token here"

Contributors


SlimShadyIAm

stekc

Ultra03

ja1dan

donato-fiore

m1stadev

mass1ve-err0r

sqlstatement

beerpsi

Special thanks

Special thanks to the following people for ideas, testing, or help: