werewolf-slack

A chat interface for playing werewolf in Slack

https://github.com/hjwylde/werewolf-slack

Version on this page:0.4.0.0
LTS Haskell 7.24:1.0.2.0
Stackage Nightly 2016-09-14:1.0.2.0
Latest on Hackage:1.0.2.0

See all snapshots werewolf-slack appears in

BSD-3-Clause licensed by Henry J. Wylde
Maintained by [email protected]
This version can be pinned in stack with:werewolf-slack-0.4.0.0@sha256:376c512e1cc02ee2d2f78c9efb466f61349528187b72ad79c0b660ac7aefe8bb,1341

Module documentation for 0.4.0.0

There are no documented modules for this package.

werewolf-slack

Project Status: Wip - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. Build Status Release werewolf-slack on Stackage LTS werewolf-slack on Stackage Nightly

A chat interface for playing werewolf in Slack. Werewolf is a well known social party game, commonly also called Mafia. See the Wikipedia article for a rundown on it’s gameplay and history.

Game description

Long has the woods been home to wild creatures, both kind and cruel. Most have faces and are known to the inhabitants of Fougères in Brittany, France; but no-one from the village has yet to lay eyes on the merciless Werewolf.

Each night Werewolves attack the village and devour the innocent. For centuries no-one knew how to fight this scourge, however recently a theory has taken ahold that mayhaps the Werewolves walk among the Villagers themselves…

Objective of the Game:
For the Loners: complete their own objective.
For the Villagers: lynch all of the Werewolves.
For the Werewolves: devour all of the Villagers.

Setup

Preparing Slack

Set up an Incoming WebHook here. Make note of the access token, we’ll be using that soon.

Set up a Slash Command (/werewolf or similar) here. The Slash Command should perform a GET request to the server werewolf-slack is going to be hosted on. Make note of the validation token here too.

Installing

Installing werewolf-slack is easiest done using either Docker (recommended), stack or Cabal.

Using Docker:

docker pull hjwylde/werewolf-slack-docker

Using stack:

stack install werewolf-slack werewolf
export PATH=$PATH:~/.local/bin

Using Cabal:

cabal-install werewolf-slack werewolf
export PATH=$PATH:~/.cabal/bin

Running

werewolf-slack is a simple web server that listens for events from the Slack Slash Command. After receiving an event werewolf-slack forwards it on to the werewolf game engine and uses the Incoming WebHook to send back the response.

Running werewolf-slack is easiest done using either Docker (recommended) or the binary itself. Make sure to add rules to your firewall for werewolf-slack’s port.

With Docker:

docker run -d -p 80:8080 hjwylde/werewolf-slack-docker -t ACCESS_TOKEN -v VALIDATION_TOKEN

With werewolf-slack:

werewolf-slack -p 80 -t ACCESS_TOKEN -v VALIDATION_TOKEN &

Configuration

It is possible to also configure the port that werewolf-slack listens on. This is done via the --port (-p) option.

The default port is 8080.

Usage

Type /werewolf help in your Slack channel to get going!

Changes

Changelog

Upcoming

v0.4.0.0

Major

  • Renamed --authentication-token to --webhook-url. (#15)
  • Renamed --validation-token to --token. (#15)
  • Removed --channel-name option. (#16)

Minor

  • Split out Dockerfile into its own repository. (#13)

Revisions

  • Changed 202 response to 200. (#17)

v0.3.0.2

Revisions

  • Removed werewolf version specification from stack.yaml.

v0.3.0.1

Revisions

  • Added version to werewolf in Dockerfile.

v0.3.0.0

Major

  • Added support for werewolf v0.5.0.0. (#12)

v0.2.0.2

Revisions

  • Added version to werewolf in Dockerfile.

v0.2.0.1

Revisions

  • Added version to werewolf-slack in Dockerfile. (#11)

v0.2.0.0

Major

  • Added options for specifying the Slack access token, channel name and port to run the server on. (#6)

Minor

  • Added a --validation-token option and validation. (#9)
  • Added a --debug flag. (#4)

Revisions

  • Fingers crossed fixed a bug with UTF-8 parsing of an accented e. (#10)

v0.1.0.0

Major

  • Initial version that connects Slack with the werewolf binary. (#1)

Minor

  • Added a Dockerfile. (#5)