A Slack bot that guesses crowd reactions to your messages.
In Slack, @reactor responds to direct messages with a guess at what the most popular reaction to it will be. It guesses based on recent interactions in public channels.
A few special commands:
- Typing
help
responds with some simple information about the bot. - Typing
update
rebuilds the classifier based on the latest messages.
To run this bot locally, retrieve the repository with:
go get github.com/kujenga/reactor
Optionally, if you have glide
on your system you can install the pinned dependencies with glide install
.
For information on how to get setup a Slack bot, check out the instructions for the Boston Golang Slack lab.
Once you have an API key, setup your shell with the following command, substituting in your token:
export SLACK_TOKEN="<my_slack_token>"
Then, you can run the bot with:
go run main.go
Special thanks to @doykle for the idea, and the jbrukh/bayesian library for making it easy to setup a bayesian classifier.