A Discord bot that helps manage your Chronicles of Darkness/New World of Darkness tabletop games.
Join the test server to see God Machine in action!
- Roll dice in a variety of formats with the
/roll
command.- Currently supports NdS+/-F (e.g. 1d20+5) and low-high+/-F (e.g. 1-10+4) formats.
- Current supports the flags
--sum
(to output sum of all rolls),--successes
(to output number successful rolls), and--N-again
(to roll an additional die for each die that lands on N).
- Create and update characters with the
/create
and/set
commands, with friendly error messages when attempting to use invalid attributes or edit a character that does not exist. - View character profiles with
/sheet
. Character profiles are paginated using emoji reactions—click onB
for basics,A
for attributes,S
for skills,M
for merits and flaws, andE
for equipment! - Roll for a specific character using Nd10 dice, where N is the sum of the attributes you want to rollfor, using the
/rollfor
command.
- Comprehensive test suites.
- Uses Rails' ActiveRecord library for model validations, queries, and migrations—without Rails!
- Includes the Pages class, which can be used to paginate lists of things.
- Clone the god-machine repository.
- Run
bundle install
to install all gem dependencies. - Rename
config/example.token.yaml
toconfig/token.yaml
and replace the token and client_id with the relevant information for your bot. - Add environmental variables for
DB_USERNAME
,DB_PASSWORD
, andRUBY_ENV
.RUBY_ENV
will default to 'production' if unset. - Run
rake db:setup
to create, migrate, and seed the databases. cd
to the god-machine folder and runruby lib/god_machine.rb
.
- Run all unit tests using
rake test
. - Run individual tests with
ruby tests/X_test.rb
. - Certain unit tests (notably
tests/models/character_test.rb
) require the test database to be cleared before rerunning. Runrake db:drop db:setup
to do so.