Session 4: command dispatcher and main entrypoint

Wire Matrix messages to the *arr clients. Dispatcher parses
"<prefix><cmd> <query>", routes movie/tv/music to Radarr/Sonarr/Lidarr,
adds the top hit, and replies in a thread. Unconfigured services reply
with a clear message instead of failing.
This commit is contained in:
prosolis
2026-05-24 20:27:17 -07:00
parent 206b378d93
commit 0de6dd8c0d
4 changed files with 443 additions and 1 deletions

View File

@@ -35,7 +35,7 @@ Rewriting Bellhop from a Python FastAPI web portal into a Go-based Matrix comman
- All adds: monitored=true, search-on-add=true, quality profile + root folder from config
- Unit tests with httptest
- [ ] **Session 4 — Command dispatch + main** (`internal/bot/`, `main.go`)
- [x] **Session 4 — Command dispatch + main** (`internal/bot/`, `main.go`)
- Parse `<prefix><cmd> <query>` (default prefix `!`)
- Commands: `movie`, `tv`, `music`, `help`
- On match: search → take `[0]` → add → reply with title/year (or error)