Skip to content

How It Works

dxcufgb edited this page Nov 5, 2026 · 2 revisions

How it works

  • Every 30 seconds (configurable) the bot calls Foundry's status endpoint GET /api/status on FOUNDRY_URL (default http://localhost:30000). That endpoint needs no login and works while Foundry shows the setup screen, so it tells the bot whether Foundry is up, which version it runs and which world is active.
  • Foundry counts as down after two failed checks in a row (configurable), so a single slow answer does not cause an alert.
  • Every five minutes, and whenever Foundry comes back up, the bot reads the system.json / module.json manifests under Foundry's user data folder (FOUNDRY_DATA_PATH) and compares versions with what it saw last time. The first scan only records what is installed; nothing is announced until something changes.
  • /updates available and /updates compatibility fetch each installed package's record from the foundryvtt.com package API (/_api/packages/get?id=…, which lists every published version with its compatibility declaration), falling back to the package's own manifest URL, and read the release list at https://foundryvtt.com/releases/. Answers are cached for 30 minutes. The compatibility verdicts are only as good as what package authors declare in their manifests.
  • /modules unused reads the active-module list (core.moduleConfiguration) from every world's settings database (Data/worlds/<id>/data/settings, LevelDB in Foundry v11+; the older NeDB settings.db is understood too) with a small read-only reader of the on-disk files, so it works while Foundry is running and without any native dependency.
  • After every poll the bot looks at the campaigns' planned sessions. 15 minutes before one, if Foundry is down, on the setup screen or running another world, it tags the campaign's DM once. 30 minutes before one, if the campaign's world is already running, it tags the players once (The world is ready to join). When the monitor sees a world start, every campaign bound to that world (in every server) whose session starts within 30 minutes or is under way gets the same message tagging its players; other world starts ping nobody.
  • Settings, campaigns and the list of already announced updates live in data/state.json next to the bot. Writes are atomic, so a crash cannot corrupt it.

See the Configuration Reference for FOUNDRY_URL, FOUNDRY_DATA_PATH, POLL_INTERVAL_SECONDS, DOWN_AFTER_FAILURES and BOT_DATA_DIR.

Clone this wiki locally