- Runs on Heroku with one dyno.
- Queries Cogitare for the
- Uses a Postgres database for all data.
- Has a
!namegenerator/picker based on real data.
- Also provides
!wordwar, many others.
- Does novel and goal management.
DISCORD_TOKEN=The discord bot token.
RACK_ENV=Currently only used for Bundler loading. Defaults to
DICERE_URL=Point to the Dicere API url.
NOMINARE_URL=Point to the Nominare API url.
DATABASE_URL=Points to a Postgres server (defaults to a local server).
DB_SCHEMA=The database schema to use (for namespacing inside a single Postgres instance, defaults to
WOLFRAM_KEY=With a valid Wolfram|Alpha key for the
COMMANDS_WHITELIST=(Optional, useful in dev.) Only loads the comma-separated commands.
Installation & Development
To run locally:
- Create a Postgres database,
- Clone this repo,
- Create a
.envfile with the configuration above in the form
- Install the dependencies:
- Run the migrations:
- Start the bot:
You might need to prefix commands with
The bot needs to be restarted at every change.
The bot was previously a Cinch IRC bot, so has peculiarities from that time.
rake fix to run the lint check and fixer (good to do before pushing).
Migrations timestamped in 2018 are the initial schema (the migration system was established in 2019). When creating a new migration, use today’s date.
After creating a migration, run it with
rake db:migrate, then immediately run
rake db:redo, to test its rollback.
rake console to get a shell with most of the same context as the app. Note
that commands are not loaded automatically.