Add the slopbot scrape backend and client lifecycle
This commit is contained in:
+13
-7
@@ -47,10 +47,16 @@ channels.
|
||||
|
||||
## Code
|
||||
|
||||
- `media-scrape/slopbot/` holds the bot core: client lifecycle, the `ScrapeBackend` implementation,
|
||||
and the invite helper.
|
||||
- discord.js is a dependency of the daemon package (`poc/package.json`), the same way the MCP SDK
|
||||
is. The code stays in `media-scrape/`; the daemon only mounts it.
|
||||
| File | Role |
|
||||
| --- | --- |
|
||||
| `media-scrape/slopbot/config.ts` | Environment and state-file settings |
|
||||
| `media-scrape/slopbot/client.ts` | Login, status, and the live fetcher |
|
||||
| `media-scrape/slopbot/backend.ts` | discord.js messages to the core message shape |
|
||||
| `media-scrape/slopbot/index.ts` | Module surface |
|
||||
|
||||
- discord.js lives in `media-scrape/package.json`; the folder is its own pnpm workspace root.
|
||||
- The mapping is duck-typed, so the tests run without a token. The live Discord shapes were checked
|
||||
against the discord.js 14 typings, but a real login is still owed at C8.
|
||||
- The Bot tab shows connection state, the guilds slopbot is in, the active scrape, and the queue.
|
||||
It also renders the invite URL from the client ID.
|
||||
|
||||
@@ -69,6 +75,6 @@ Slopbot runs with the faster bot budget; the puppet backend uses the slower user
|
||||
|
||||
## Status
|
||||
|
||||
Design approved 2026-09-16. Scaffold added 2026-09-16: `media-scrape/slopbot/` (config loader and
|
||||
invite helper) and the discord.js dependency in `media-scrape/package.json`. Unused until
|
||||
checkpoint C4 in [CURRENT.md](../CURRENT.md).
|
||||
Backend implemented 2026-09-16 (C4): mapping, paging, and client lifecycle, tested with a fake
|
||||
fetcher. Not wired into the daemon yet; that is C5. A live login with a real token is owed at C8.
|
||||
Checkpoints: [CURRENT.md](../CURRENT.md).
|
||||
|
||||
Reference in New Issue
Block a user