Slack bot that helps users to do polling and allows users.
Basic poll -- encapsulate each individual option in double quotes
/poll "Question" "Option 1" "Option 2"
Multi-Option poll -- add `-m` flag at the end
/poll "Question" "Option 1" "Option 2" -m
To integrate into your Slack workspace, you will need to create a Slack App and configure
- Interactive Components > Interactivity > Request URL (for the /hook Endpoint)
- Slash Commands (for the /polls Endpoint)
- OAuth & Permissions > Scopes > Add permissions [
chat:write:bot
,commands
,reactions:write
]
Initialize .env
file with
DATABASE_URL
(if SQLite ignoreDATABASE_URL
)SLACK_VERIFICATION_TOKEN
from Basic Information > App Credentials > Verification TokenSLACK_ACCESS_TOKEN
from OAuth & Permissions > OAuth Tokens & Redirect URLs > Tokens for Your Workspace > OAuth Access Token- (Optional) You can define the poll display name in slack via
SLACK_MESSAGE_BAR_COLOR
(default: #ffd100) - (Optional) You can define the poll side color from the message via
SLACK_APP_DISPLAY_NAME
(default: Yellow Poll) - (Optional) You can use
icon_emoji
list as a comma separed list withSLACK_MESSAGE_ICON_EMOJIS
env var to change the slack bot profile image, if you define more than one it will pick one randomly. iex:one,two,three
. (default: 📊)
cp .env.example .env
npm start
Generating Migrations
yarn sequelize migration:generate --name <migration_name> --migrations-path app/infrastructure/sequelize/migrations
Running daemon
npm run dev