https://github.com/aloussase/squad-rotation-bot
Bot to send messages to your chats to indicate who's turn is it to facilitate the daily rituals
https://github.com/aloussase/squad-rotation-bot
bot go golang
Last synced: 5 months ago
JSON representation
Bot to send messages to your chats to indicate who's turn is it to facilitate the daily rituals
- Host: GitHub
- URL: https://github.com/aloussase/squad-rotation-bot
- Owner: aloussase
- Created: 2025-09-29T17:09:01.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-31T03:15:12.000Z (8 months ago)
- Last Synced: 2025-10-31T05:23:43.922Z (8 months ago)
- Topics: bot, go, golang
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Squad Rotation Bot
This is a bot that you can integrate into your gchat spaces to send a message
to indicate who's turn is it to facilitate the daily.
## Pre-requisites
This is an application that runs periodically on a scheduled time, so you will
need to have some server where to run it.
I personally run my instance on one of my Raspberries, but any hosted server
should work as well. I can recommend [Hetzner](https://www.hetzner.com/).
## Configuring
Make sure to configure the following according to your needs:
- **The time at which to run the bot** is configured in `scripts/crontab`.
Follow the indications in that file.
- **Set the webhook URL** by setting the `WEB_HOOK_URL` environment variable to
the value of the gchat webhook URL. You can generate this in the integrations
settings tab of your gchat space.
- **Optionally configure the database connection details** by setting the
environment variables used in the compose file
## Usage
### With docker-compose
1. Clone this repository:
```shell
git clone https://github.com/aloussase/squad-rotation-bot
cd squad-rotation-bot
```
2. Run the services:
```shell
export WEB_HOOK_URL='...'
docker compose up -d
```
## Managing squad members
You basically have 3 options for managing squad members.
### 1. Edit the `databse/init.sql` file
You can edit the database initialization script and add `INSERT` statements to
insert your squad members.
### 2. Exec into the Postgres container
You can also exec into the running Postgres container to use `psql` to `INSERT` the
squad members:
```shell
docker compose exec db psql -U postgres
```
That command will start a `psql` console where you can issue your database commands.
Make sure to replace `postgres` by whatever value you've configured as the
database user, if any. `postgres` is the default one.
### 3. Use the provided CLI
There is a Docker image that packages a CLI tool to manage your squad members.
You can run it with the following command:
```shell
docker run -it --network host aloussase69/squad-rotation-bot-cli
```

## Contributing
Contributing ideas:
- More messaging backends (e.g.: discord, slack, carrier pigeon; etc)
## License
MIT