- Flesh out docs
- Look into slack apps to simplify end user setup
- Create a new slack app
- Copy
Signing Secret - Go to
Features > Oauth & Permissionsand 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 ModeinSettings > Socket Mode- this should force you to create an app token and add the
connections:writescope
- this should force you to create an app token and add the
- Copy the newly created
App-Level TokeninSettings > Basic Information - Go to
Features > Event Subscriptionsand 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_TOKENSLACK_SIGNING_SECRETSLACK_APP_TOKEN
- run the app with
npm start
- Run
npm testto run the tests - Run
npm run test:coverageto run the tests with coverage output
- export the following environment variables (copied when creating the app):
SLACK_BOT_TOKENSLACK_SIGNING_SECRETSLACK_APP_TOKEN
- run the app with
npm run docker:build-and-run