A small but mighty implementation of the Reaction Bot library to post messages to channels based on emoji reactions.
To run this project locally, copy the contents of .env-sample
to .env
and replace the token with the correct tokens from Slack. You can either run the project with a local Go installation, or you can use Docker.
To install dependencies, run:
go get
To initialize, run:
go run main.go
To compile the binary, run:
go build main.go
To build the container after initial setup or making changes, run:
docker compose build
To run the binary from the container, run:
docker compose up
Looking to shake things up? You can customize the emoji and the channels they should post to in reaction-bot.go
by modifying registeredReactions
. For configuration options on registering emoji, see the docs.
When changes are pushed to main
, an image is built and published to the GitHub Container Registry. From the server, you can pull the image and restart the bot with following commands:
docker pull ghcr.io/sparkbox/reaction-bot
docker compose up -d