This is an example slack bot
Based on https://github.com/tcnksm/go-slack-interactive ("beer" logic) and simple poll
Packages which use in this example project
- slack - slack library
- wire - dependency Injection
- chi - HTTP router
- godotenv - load env variables from files
- logrus - logger
- cli - simple and fast CLI
- Install golang, packages
- Add
.env.development
file withSLACK_TOKEN
andSLACK_SIGNING_SECRET
in repository - Run
go run main.go start
- Install ngrok
- Setup in
api.slack.com/
:Interactivity Request URL = https://#.ngrok.io/slack/interative-endpoint
Slash Commands '/poll' = https://#.ngrok.io/slack/command
OAuth & Permissions Redirect URLs = https://#.ngrok.io/slack/redirect
Scopes channels:history, chat:write, commands, pins:read, pins:write
Event Subscriptions Request URL = https://#.ngrok.io/slack/events
- Add bot to app
- Write
give beer
in a chat or run/poll
command