Skip to content

giraugh/critical-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Critical Counter

Discord bot for keeping track of natural 20 and natural 1 rolls in Role Playing games.

Usage

First invite the bot to your server

Then run !helpcc command to list the available commands.

Building and Running

To run this project you will require

Ensure the following binaries are on your PATH:

  • deno
  • docker-compose

Clone the repo

git clone http://github.com/retroverse/critical-counter.git

cd into the repo

cd critical-counter

You 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 .env

Use 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>

For Production

Build the containers

docker-compose build

Start the containers

docker-compose up

After a while you should see the bot come online.

For Development

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=localhost

Start the postgres database

docker-compose up postgres

Once the database is ready, in a seperate shell you can start the bot

denon run --allow-net --allow-read --allow-env main.ts

You should see the bot come online and automatically restart if you change any source files.

Contributing

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 😃

About

Discord bot for recording critical rolls in roleplaying games.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published