A Discord bot that allows you to have Pokemon battles on Discord with your friends.
It uses pokemonbattlelib served over HTTP to simulate the battles using generation 4 rules.
Required:
- docker
- docker-compose
Put your discord bot's token in the token
file.
You can optionally set up a virtual environment,
conda env create -f environment.yml
conda env update -f environment.yml --prune # update an existing environment
conda activate pkmn-discord
and then install the development dependencies.
pip install -r requirements-dev.txt
pre-commit install
docker-compose up
To force a rebuild:
docker-compose up --build
The battle API is served over port 4000, and the flask server is served over port 5000.
You can run these scripts to check your code. (Requires the packages in requirements-dev.txt to be installed.)
./scripts/lint-style.sh
./scripts/lint-check-types.sh
Commands are subject to change since we are in the development stage at the moment. This will be an evolving list of commands!
Prefix: p!
help
ping
will returnpong
challenge OPPONENT
docker-compose run bot ./scripts/test.sh
- Create another bot. This will be the "tester".
- Make sure these settings are enabled under the
Bot
section.
- Run
docker-compose run bot ./scripts/integration-test.sh
to create the config file attests/config
- Fill out the fields in the newly generated
tests/config
- Make sure Brock is running
docker-compose up -d
- Run the tests
docker-compose run bot ./scripts/integration-test.sh
If tests/config
is not present, it will be created for you when you run the script. It requires another bot (the tester) to send messages and interact with Brock (the testee).
- You can now stop Brock
docker-compose down