- Flesh out docs
- Look into slack apps to simplify end user setup
- Create a new slack app
- Copy
Signing Secret
- Go to
Features > Oauth & Permissions
and grant the following permissions:channels:history
: the bot needs to be able to read messages that are reacted to
chat:write
: for the bot to write messagesreactions:read
: so that the bot can react to reaction eventsgroups:history
: so that the bot can read and react to messages sent in private channelsusers:read
: so that the bot can determine if a user is a bot or not
- Install app in workspace
- Copy the
Bot User Oauth Toekn
- Enable
Socket Mode
inSettings > Socket Mode
- this should force you to create an app token and add the
connections:write
scope
- this should force you to create an app token and add the
- Copy the newly created
App-Level Token
inSettings > Basic Information
- Go to
Features > Event Subscriptions
and enable the followingbot events
:message.channels
: so that the bot can react to messages sent in channelsreaction_added
: so the bot can react to reactions added to messagesreaction_removed
: so that the bot can react to reactions removed from messagesmessage.groups
: so the bot can react to messages sent to private channels
- Add a slack command for
/leaderboard
- export the following environment variables (copied when creating the app):
SLACK_BOT_TOKEN
SLACK_SIGNING_SECRET
SLACK_APP_TOKEN
- run the app with
npm start
- Run
npm test
to run the tests - Run
npm run test:coverage
to run the tests with coverage output
- export the following environment variables (copied when creating the app):
SLACK_BOT_TOKEN
SLACK_SIGNING_SECRET
SLACK_APP_TOKEN
- run the app with
npm run docker:build-and-run