Skip to content

sparkbox/reaction-bot

Repository files navigation

Reaction Bot

A small but mighty implementation of the Reaction Bot library to post messages to channels based on emoji reactions.

Running locally

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.

Go

To install dependencies, run:

go get

To initialize, run:

go run main.go

To compile the binary, run:

go build main.go

Docker

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

Customizing

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.

Deploying

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

About

A small but mighty implementation of the Reaction Bot library for Slack.

Resources

Stars

Watchers

Forks