Discord bot for keeping track of natural 20 and natural 1 rolls in Role Playing games.
First invite the bot to your server
Then run !helpcc command to list the available commands.
To run this project you will require
Ensure the following binaries are on your PATH:
denodocker-compose
Clone the repo
git clone http://github.com/retroverse/critical-counter.gitcd into the repo
cd critical-counterYou will require a discord token to run the bot. Go to the Discord Developer Console, create an application, create a bot and copy the bot token. We will put the bot token in a .env file.
Create a .env file
touch .envUse your preferred text editor to add the token to the .env file. It should look like the following with <TOKEN> replaced with your token
DISCORD_TOKEN=<TOKEN>Build the containers
docker-compose buildStart the containers
docker-compose upAfter a while you should see the bot come online.
For development purposes, denon can be used to auto-restart the bot. If not using denon, replace any use of denon with deno
When developing you can run the deno program outside of a container. However, you will have to update the environment variables so that it can find the database inside the postgres container. To do so, add the following line to the .env file.
POSTGRES_HOST=localhostStart the postgres database
docker-compose up postgresOnce the database is ready, in a seperate shell you can start the bot
denon run --allow-net --allow-read --allow-env main.tsYou should see the bot come online and automatically restart if you change any source files.
If you have a suggestion for this bot or have encountered a bug, please open a new issue after checking whether one exists for your problem.
Pull Requests are welcome 😃