BallsDex is a bot for collecting countryballs on Discord and exchange them with your friends!
You can invite the bot here.
Feel free to ask any question on the Discord server above, we'll be here for discussing about your issue. If we estimate that your issue is important, you may be invited to post here instead (or we'll do it for you).
You can directly post an issue in this repo, be sure to use the template!
The bot comes as a poetry Python package and can run using Docker.
You must first setup a Discord bot. No privileged intents are required!
-
Install Docker on your machine. We assume you have the correct permissions to run commands.
-
At the root of the repository, run
docker compose build -
Add a text file
.envat the root of the repository in the following form:BALLSDEXBOT_TOKEN=your token here BALLSDEXBOT_DB_PASSWORD=a random string
-
Run the bot with
docker compose up -d
The bot will be running in detached mode. You can view the logs with docker compose logs -f.
If you want to shutdown the bot, run docker compose down.
When updating the bot, do the following:
git pulldocker compose builddocker compose down && docker compose up -d
This part is not supported. I use docker myself for production, and run the db and
redis-cache services from docker-compose for development.
We assume that you have Python 3.10 and pip installed.
-
Start a PostgreSQL server on the host.
- Create a postgres user and database.
-
Start a Redis serve on the host.
-
Install poetry with
pip install poetry. -
Run
poetry install -
Export the following environment variables:
BALLSDEXBOT_TOKEN: the Discord bot tokenBALLSDEXBOT_DB_URL: a link in the formpostgres://{postgres user name}:{postgres password}@localhost:5432/{database name}BALLSDEXBOT_REDIS_URL: a link in the formredis://localhost
Replace
localhostwith any host when appropriate. -
Run
poetry run python3 -m ballsdex
There are some command line options available when starting the bot.
See them with python3 -m ballsdex --help.
Take a look at the contribution guide for setting up your environment!
This repository is released under the MIT license.
If distributing this bot, credits to the original authors must not be removed.

