Expand description
Lemmy/Reddthat community monitor.
Watches EVERY post + comment in a community (e.g. c/fanfiction on
reddthat.com), not just mentions. Fanfiction URLs get a metadata reply from
the bot; text that reads like a request (“looking for a fic where…”) gets
an /ask search reply. State (last seen post/comment ids) is kept in Redis
under archivist:lemmy:* so the monitor is idempotent across restarts.
Works against any Lemmy instance’s public JSON API (/api/v3/...); no
websocket needed for polling.
Functions§
- run_
monitor - Run the monitor loop forever (spawned as a background task by
main). Polls the community’s new posts + comments; replies to anything that has a fanfiction URL or reads like a fic request. Best-effort: every failure is logged and the loop continues.