Skip to content

yellowme/slack-poll

Repository files navigation

SlackPoll

Slack bot that helps users to do polling and allows users.

SlackPoll

Usage

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

Instalation

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 ignore DATABASE_URL)
  • SLACK_VERIFICATION_TOKEN from Basic Information > App Credentials > Verification Token
  • SLACK_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 with SLACK_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

Development

Generating Migrations

yarn sequelize migration:generate --name <migration_name> --migrations-path app/infrastructure/sequelize/migrations

Running daemon

npm run dev

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published