This bot can be used to create reminders for a specific time at a day.
- Create reminders for a specific time at the current day.
- Change display name per room
- Configure an offset for the reminder time
- Simple rights management (same as for my other bots)
- Get a matrix account for the bot (e.g., on your own homeserver or on
matrix.org) - Prepare configuration:
- Copy
config-sample.jsontoconfig.json - Enter
baseUrlto the matrix server andusername/passwordfor the bot user - Add yourself to the
admins(and delete my account from the list :)) - You can limit the users that can interact with the bot by defining the
userslist
- Copy
- Either run the bot via jar or run it via the provided docker.
- If you run it locally, you can use the environment variable
CONFIG_PATHto point at yourconfig.json(defaults to./config.json) - If you run it in docker, you can use a command similar to this
docker run -itd -v $LOCAL_PATH_TO_CONFIG:/usr/src/bot/data/config.json:ro ghcr.io/dfuchss/yarb
- If you run it locally, you can use the environment variable
The bot is configured through a JSON configuration file. Copy config-sample.json to config.json and adjust the following options:
| Option | Type | Description |
|---|---|---|
baseUrl |
String | The base URL of the Matrix server (e.g., "https://matrix-client.matrix.org") |
username |
String | The username of the bot's Matrix account |
password |
String | The password of the bot's Matrix account |
admins |
Array of Strings | List of Matrix user IDs that have admin privileges (e.g., ["@user:matrix.org"]) |
| Option | Type | Default | Description |
|---|---|---|---|
prefix |
String | "yarb" |
The command prefix the bot listens to (change if you want to use a different command like !lunch instead of !yarb) |
dataDirectory |
String | "./data/" |
The path to the directory where the bot stores its data (timers, media downloads, etc.) |
users |
Array of Strings | [] |
List of Matrix server domains or full user IDs that are allowed to interact with the bot. If empty, all users can interact. Examples: [":matrix.org", ":fuchss.org"] for server domains, or ["@user:matrix.org"] for specific users |
offset_in_minutes |
Number | 0 |
Offset for reminders in minutes. For example, 5 means reminders will be sent 5 minutes before the specified time. Must be 0 or positive |
Basic configuration (all users allowed):
{
"prefix": "yarb",
"baseUrl": "https://matrix-client.matrix.org",
"username": "my-reminder-bot",
"password": "your-bot-password",
"dataDirectory": "./data/",
"admins": ["@yourusername:matrix.org"],
"users": [],
"offset_in_minutes": 0
}Restricted configuration (only specific servers allowed, with 5-minute early reminders):
{
"prefix": "remind",
"baseUrl": "https://your-homeserver.com",
"username": "reminder-bot",
"password": "your-bot-password",
"dataDirectory": "/path/to/bot/data/",
"admins": ["@admin1:your-server.com", "@admin2:your-server.com"],
"users": [":your-server.com", ":trusted-server.org"],
"offset_in_minutes": 5
}| Variable | Description | Default |
|---|---|---|
CONFIG_PATH |
Path to the configuration file | ./config.json |
- An admin can invite the bot to an unencrypted room. If the room has enabled encryption or if the invite was not sent by an admin, the bot ignores it (without logging it)
- After the bot has joined use
!yarb helpto get an overview about the features of the bot (remember: the bot only respond to users) - In order to create a new reminder use
!yarb <time> <message>. The time has to be in the formatHH:mm(e.g.,!yarb 12:00 Lunch time!). - You can configure the bot name in the
config.json
You can create polls where participants vote using emoji reactions, and everyone who voted gets reminded with only the winning option(s). To do this, provide multiple lines after the time. Each line must be in the form:
<emoji>: <message>
If you supply only a single message or the format is invalid, it gracefully falls back to the simple reminder behavior using the default reaction (:+1:).
Example (three lunch options):
!yarb 12:30
🍕: Pizza
🍔: Burger
🥗: Salad
Participants vote by reacting with 🍕, 🍔, or 🥗. At 12:30 (minus offset) the bot tags everyone who voted (regardless of their choice) and posts only the winning option. If there's a tie for most votes, all tied options are listed.
I'm typically online in the Trixnity channel. So feel free to tag me there if you have any questions.