capture
Archive a Discord channel into SQLite, incrementally fetching new messages or backfilling full history. Runs as a background job with optional wait and media download controls.
Instructions
Archive a Discord channel into the SQLite archive.
Incremental by default: only messages newer than the stored watermark (MAX message id per channel) are fetched. Use full=True for a one-time backfill. Requires the persistent Chrome daemon (auto-starts; the user must have logged into Discord in its profile at least once).
Long jobs run in the background: the call waits up to wait seconds
(default 45) and returns the full result if the capture finished in
time. If it is still running, it returns {"status": "running", ...}
immediately and the capture continues — call capture() again for the
same channel to fetch the final result, or watch progress via
status()/recent(). Never fire captures for several channels in
parallel: they queue on the global capture lock and serialize
automatically (capture() reports waiting_for_lock while queued).
Args: channel: channel ID or full discord.com/channels/... URL. full: backfill the entire history instead of incrementing. since: explicit watermark message ID (overrides the stored one). limit: hard cap on messages (test runs). no_media: skip attachment + embed-image downloads (CDN links expire!). refresh: re-extract ALL visible messages, retrofitting embed images onto rows captured before image extraction existed (combine with full=True for the whole channel). wait: seconds to wait synchronously for completion before returning a "running" summary (keep below your client's request timeout (many clients cap it at ~60 s). Returns: Dict with new_messages, seen, stop_reason, total_in_db — or a {"status": "running", "job": {...}} summary for long backfills.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | ||
| wait | No | ||
| limit | No | ||
| since | No | ||
| channel | Yes | ||
| refresh | No | ||
| no_media | No |