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.developmentfile withSLACK_TOKENandSLACK_SIGNING_SECRETin repository - Run
go run main.go start - Install ngrok
- Setup in
api.slack.com/:Interactivity Request URL = https://#.ngrok.io/slack/interative-endpointSlash Commands '/poll' = https://#.ngrok.io/slack/commandOAuth & Permissions Redirect URLs = https://#.ngrok.io/slack/redirectScopes channels:history, chat:write, commands, pins:read, pins:writeEvent Subscriptions Request URL = https://#.ngrok.io/slack/events
- Add bot to app
- Write
give beerin a chat or run/pollcommand