Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sparkbox/reaction-bot
A small but mighty implementation of the Reaction Bot library for Slack.
https://github.com/sparkbox/reaction-bot
Last synced: 5 days ago
JSON representation
A small but mighty implementation of the Reaction Bot library for Slack.
- Host: GitHub
- URL: https://github.com/sparkbox/reaction-bot
- Owner: sparkbox
- Created: 2021-03-09T00:47:24.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-13T21:06:18.000Z (11 months ago)
- Last Synced: 2024-12-17T02:03:11.081Z (about 1 month ago)
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 17
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reaction Bot
A small but mighty implementation of the [Reaction Bot library][reaction_bot_repo] 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:
```cli
go get
```To initialize, run:
```cli
go run main.go
```To compile the binary, run:
```cli
go build main.go
```### Docker
To build the container after initial setup or making changes, run:
```cli
docker compose build
```To run the binary from the container, run:
```cli
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][reaction_bot_register_emoji].
[reaction_bot_repo]: http://github.com/jordanleven/reaction-bot
[reaction_bot_register_emoji]: https://github.com/jordanleven/reaction-bot#registering-emoji## 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:
```cli
docker pull ghcr.io/sparkbox/reaction-bot
docker compose up -d
```