IB.ai, but in Python
To run this project, you need to have Docker and Python >=3.11 installed.
- Clone this repository
git clone https://github.com/ib-ai/ib.py.git
and navigate to the root directory.
cd ib.py
- Copy the
config.example.json
, rename toconfig.json
, and replace the relevant values. Thetoken
andapplication_id
of your application can be found inside your Discord developer portal. Exampleconfig.json
:
{
"token": "a long string of random characters",
"prefix": "&",
"description": "Discord bot for the r/IBO server. Join here: discord.gg/ibo",
"application_id": 18-19 digit number,
"db_host": "localhost",
"db_user": "postgres",
"db_name": "postgres",
"db_password": "password"
}
If you want to inject the config at runtime using environment variables, you need not replace the values in config.json
.
- Run the docker container.
docker-compose -f docker-compose.postgres.yml up --build
Please read the CONTRIBUTING.md
file to find out more about contributing towards the project.
We use PDM to manage dependencies for this project and Ruff to handle linting and code formatting.
git clone https://github.com/ib-ai/ib.py.git
and navigate to the root directory.
cd ib.py
2. Install pdm
(requires either virtualenv, venv, or conda to be installed)
pdm install
Either activate virtual environment if you are running commands in the terminal
Or
Choose .venv\Scripts\python.exe
as the interpreter in your IDE.