Skip to content

Commit

Permalink
Updated readme with example images
Browse files Browse the repository at this point in the history
  • Loading branch information
thordy committed Mar 28, 2020
1 parent 79abdf1 commit 14c3bd6
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
![kcapp logo](https://raw.githubusercontent.com/kcapp/frontend/master/public/images/logo.png)
# announcer
Simple `node` script which listens for certain events from `socket.io` and announce them in a slack channel
Simple `node` script listening for certain events on `socket.io` and announce them in a [Slack](https://slack.com/) channel



## Example
#### Match Started
Once a official match starts, a message will be posted showing the two players and a link to spectate the match

![Match Started](https://raw.githubusercontent.com/wiki/kcapp/frontend/images/announcer/announcer_started.png)

#### Match Thread
For each leg finishing, a message will be posted to the thread of the original message, showing who won the leg, with what checkout and after how many darts

![Match Thread](https://raw.githubusercontent.com/wiki/kcapp/frontend/images/announcer/announter_thread.png)

#### Match Ended
Once the match finishes, the original messag will be updated with the final result, as well as a link to the match result

![Match Ended](https://raw.githubusercontent.com/wiki/kcapp/frontend/images/announcer/announter_result.png)

## Install
1. Clone repository `git clone https://github.com/kcapp/enhancements.git`
2. Install all node dependencies `npm install`
4. Run with `ANNOUNCE=true SLACK_CHANNEL=<channel> SLACK_KEY=<key> DEBUG=kcapp* npm start`
2. Install all dependencies `npm install`
3. Run with `ANNOUNCE=true SLACK_CHANNEL=<channel> SLACK_KEY=<key> DEBUG=kcapp* npm start`

### Configuration
To make the `announcer` work it must be linked to a [Slack app](https://api.slack.com/).

Configuration is done via the following environment variables
* `ANNOUNCE`: By default no messages are posted, so this must be set to `true` to post. If not messages will only be logged out for debugging
* `SLACK_CHANNEL`: ID of the Slack channel to post to
* `SLACK_KEY`: Bot User `OAuth Access Token`
* `DEBUG`: value is passed to [debug](https://github.com/visionmedia/debug) module to specify which packages should be logged

### Service
To run this as a service see [kcapp-announcer.service](https://github.com/kcapp/services/blob/master/kcapp-announcer.service)
To run this as a service see [kcapp-announcer.service](https://github.com/kcapp/services/blob/master/kcapp-announcer.service)

0 comments on commit 14c3bd6

Please sign in to comment.