Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


A tabletop dice rolling bot, which can easily be deployed to Heroku. You can also use the publicly hosted version. Go to the rollbot website for more information.


The config files contain four possible entries at the moment. By default local running will use the config/local.json file and production will use config/production.json. Two example json files are provided which you can rename. The local config is gitignored to avoid exposing your testing discord bot token. It is recommended you use Heroku environment variables for production configuration.

Entries discord_token or discord_token_env_var are used to set your discord bot token. If the first one is set the second one is ignored. The first one is used to directly set the token, while the second one can be used to set the name of an environment variable that holds the token.

The same principle applies for redis_url and redis_url_env_var. Note that if neither is set the app will still run without variable environment saving.

Running Locally

Make sure you have Python 3.8.2 installed locally, for example using pyenv (be sure to check the Common build problems page if you run into any issues). To push to Heroku, you'll need to install the Heroku CLI. Additionally, to make user variable environments you'll need to setup redis. I suggest you don't bother with this for your local testing setup. I use pipenv to manage dependencies. For just running it you can also revert back to plain pip though.

$ git clone
$ cd roll-bot-standalone

# raw installing dependencies
$ python3 -m venv roll-bot-standalone
$ source roll-bot-standalone/bin/activate
$ pip install -r requirements.txt

# pyenv installing dependencies
$ pyenv install 3.8.2
$ pyenv shell 3.8.2
$ pyenv virtualenv roll-bot-standalone
$ pyenv activate roll-bot-standalone
$ pip install -r requirements.txt

# pyenv+pipenv installing dependencies
$ pyenv install 3.8.2
$ pyenv shell 3.8.2
$ pip install pipenv
$ pipenv install

# raw running the app
$ source roll-bot-standalone/bin/activate
$ python

# pyenv running the app
$ pyenv activate roll-bot-standalone
$ python

# pyenv+pipenv running the app
$ pipenv run python

Your app should now be running and announce its discord username.

Deploying to Heroku

First create a new app on heroku, using free dynos is fine. Provision the RedisCloud addon, again, free tier is fine. Now set an environment variable DISCORD_TOKEN with your discord bot token and copy production.example.json to production.json.

Then in the terminal run the following commands.

$ heroku git:remote -a HerokuAppName 
$ git push heroku master

Your app should now be live.


A tabletop dice rolling bot, which can easily be deployed to Heroku.







No packages published