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/eventsurl of hosted bot - Subscribe to bot events:
message.channelsmessage.immessage.groups
- Add additional scopes:
chat.writereactions.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.jswith Node, with the following environment variables set:DICTIONARY_API_KEYSLACK_SIGNING_SECRETSLACK_BOT_TOKEN