Slack bot for playing Hangman.
- Add bot to channel
- Start a new game by
/hangman [word]
- Guess letters by posting messages consisting of a single letter
Notes to myself for if I need to host it again.
- Apps can be configured at https://api.slack.com/apps
- Enable events, pointing to
/slack/events
url of hosted bot - Subscribe to bot events:
message.channels
message.im
message.groups
- Add additional scopes:
chat.write
reactions.write
- Add
/hangman [word]
slash command, using same endpoint as events - Host the bot somewhere, such as the Node.js Quickstart droplet
- Get an API key from https://dictionaryapi.com/ for definition lookups
- Run
index.js
with Node, with the following environment variables set:DICTIONARY_API_KEY
SLACK_SIGNING_SECRET
SLACK_BOT_TOKEN