pylaligand / destiny-slack-bot

A Slack bot with Destiny-related commands
MIT License
8 stars 5 forks source link

Destiny bot for Slack - deprecated!

Destiny 2 is out, and the Slack bot is getting a new look as well! Check out the new version.

Build status

This is a Slack bot for Destiny clans. It exposes commands to look up various aspects of the game thanks to the great API Bungie published.

This bot runs on Heroku infrastructure, powered by the Dart build pack which publishes some tools and instructions to deploy a Dart app to Heroku.

Note that in Slack each command needs to be added as a custom integration. It should be possible to package them as an app, although this has not be attempted yet.

Commands

Notifications

Configuration

Several configuration parameters must be passed to your Heroku dyno. This can be done either via the web interface or via the command line:

heroku config:set PARAMETER_NAME=abcde01234ghijk56789

Here are the required parameters:

Database

The world database is created from the SQLite world database provided in the manifest and downloaded via tool/download_world_content. It is converted to a Postgres database with tool/create_database.

A local Postgres instance will be needed for testing, whereas a live instance can be set up on Heroku. The local instance is provisioned via the creation tool, while the live instance is bootstrapped from the local instance with:

heroku pg:reset DATABASE_URL
heroku pg:push <local db name> DATABASE_URL --app <your app's name>

Running locally

When running a local server, pass the configuration parameters as environment variables:

PARAM1=foo123 PARAM2=bar456 pub run bin/server.dart

Note that you will likely want to set USE_DELAYED_RESPONSES to false when testing locally so that you can receive command results with whichever tool you use (e.g. http client GUI) to send the requests.