You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,20 @@
7
7
You can configure HTTP-backed bot commands in `bot.json`. Example commands included:
8
8
9
9
-`/bot joke` — uses icanhazdadjoke (returns the `joke` field)
10
-
-`/bot quote` — uses quotable.io (returns the `content` field)
11
10
-`/bot catfact` — uses catfact.ninja (returns the `fact` field)
11
+
-`/bot summary` — fetches daily link summaries from linkstash API
12
12
13
-
Add or change commands in `bot.json` and set `BOT_CONFIG_PATH` in `config.json` if you place it elsewhere. The bot will prefix responses using `BOT_REPLY_LABEL` in `config.json` (defaults to `> `).
13
+
Add or change commands in `bot.json` and set `BOT_CONFIG_PATH` in `config.json` if you place it elsewhere. The bot will prefix responses using `BOT_REPLY_LABEL` in `config.json` (defaults to `[BOT]\n`).
14
+
15
+
### Room-specific bot configuration
16
+
17
+
Bot commands are enabled per room via the `allowedCommands` array in `config.json`:
18
+
19
+
-`"allowedCommands": []` — Enable bot with all commands allowed
20
+
-`"allowedCommands": ["summary", "joke"]` — Enable bot with only specific commands
21
+
- Omit `allowedCommands` — Bot disabled in that room
22
+
23
+
This allows fine-grained control over which commands are available in each room.
14
24
15
25
pairs nicely with [lava](https://polarhive.net/lava)
16
26
@@ -38,7 +48,15 @@ Edit `config.json`:
38
48
-`MATRIX_USER`: Your Matrix user ID
39
49
-`MATRIX_PASSWORD`: Password
40
50
-`MATRIX_RECOVERY_KEY`: For E2EE verification
41
-
-`MATRIX_ROOM_ID`: Array of rooms to watch
51
+
-`MATRIX_ROOM_ID`: Array of rooms to watch, each with:
52
+
-`id`: Room ID
53
+
-`comment`: Human-readable name
54
+
-`hook`: Optional webhook URL for link processing
55
+
-`key`: Webhook auth key
56
+
-`sendUser`/`sendTopic`: Whether to include user/topic in webhooks
57
+
-`allowedCommands`: Array of allowed bot commands (empty = all, omit = disabled)
0 commit comments