Avrae is a bot to facilitate running Dungeons & Dragons 5e online over Discord.
You can join the Avrae Development Discord here!
Check out docker/readme.md.
Avrae runs best on Ubuntu 16.04.4, but should be fully compatible with any UNIX-based system. It is possible to run Avrae on Windows, but is not recommended.
Avrae is a large project, and can be a bit daunting to get running. You'll need to create a few files first.
credentials.py should include, at the very least, variables as such:
officialToken- Empty string.
owner_id- The Discord User ID of the bot owner (you, if testing).
test_redis_url- The URI of a Redis cache (e.g.
test_mongo_url- The URI of a MongoDB instance. (e.g.
testToken- A valid Discord Bot token.
test_dicecloud_user- A Dicecloud username.
test_dicecloud_pass- The Dicecloud password of the Dicecloud user.
test_dicecloud_token- A Dicecloud API token.
You'll also need to create a Google Drive Service Account. You can find instructions on how to do this here.
Follow steps 1-3 in the Signed Credentials portion. Rename the JSON
avrae-google.json and put it in the project root.
You will need to run a Redis instance to serve as a high-performance cache. Download Redis 4.0 and run a redis server locally before launching Avrae.
You will also need to run a MongoDB instance to serve as Avrae's database.
To actually run Avrae, you need Python version >= 3.8.0.
First, install the dependencies with
pip install -r requirements.txt.
python dbot.py test.
To test Avrae, run these commands:
docker-compose -f docker-compose.test.yml -p avrae build docker-compose -f docker-compose.test.yml -p avrae up -d docker logs -f avrae_tests_1
This should initialize an ephemeral database to run command unit tests in.
You should set the
GOOGLE_SERVICE_ACCOUNT env vars to their correct values.
Env vars required to deploy to production:
NUM_CLUSTERS- equal to the number of ECS tasks running Avrae
DDB_AUTH_SECRET- JWT signing secret for DDB auth request
DDB_AUTH_WATERDEEP_SECRET- JWT signing secret for DDB auth response
DDB_AUTH_AUDIENCE- JWT audience (default
DDB_AUTH_ISSUER- JWT issuer (default
DDB_AUTH_EXPIRY_SECONDS- JWT expiry (default 5m)
DDB_AUTH_SERVICE_URL- DDB Auth Service base URL
DYNAMO_REGION- AWS region for Entitlements DB
DYNAMO_USER_TABLE- Table name for Entitlements user table
DYNAMO_ENTITY_TABLE- Table name for Entitlements entity table
AWS_ACCESS_KEY_ID- AWS Access Key to access Dynamo
AWS_SECRET_ACCESS_KEY- AWS Secret Access Key
LAUNCHDARKLY_SDK_KEY- LaunchDarkly SDK Key
CHARACTER_COMPUTATION_ENDPOINT- HTTP endpoint for DDB character computation call
Other env vars:
NUM_SHARDS- explicitly set the number of shards to run
GIT_COMMIT_SHA- should be set in Travis (required for prod)