1. What Is Discrawl?
Discrawl is a local data archiving and retrieval tool built exclusively for Discord, integrated into the OpenClaw project as an official Skill. Its core design philosophy is to pull Discord server data down to local storage, enabling users to efficiently run offline queries and analysis on historical messages without relying on Discord’s native search or hitting API rate limits.
This skill corresponds to a standalone Go project
openclaw/discrawl. The CLI binary can be installed directly via go install.2. Core Features
1. Data Synchronization (Sync)
Discrawl syncs Discord guild (server) channels, threads, messages and member profiles into a local SQLite database. Two sync modes are available:
- Incremental Sync: Pull only newly generated data to keep local archives consistent with remote Discord content.
- Full Sync (
--fullflag): Backfill all historical data for complete local archiving.
2. Local Full-Text Search
Powered by SQLite FTS5 full-text indexes, Discrawl delivers fast keyword searches over local message archives.
Example command:
discrawl search --limit 20 "your_keyword"
3. Channel & Direct Message Lookup
- Fetch recent channel messages:
discrawl messages --channel '#channel-name' --days 7 --all
- Retrieve latest direct messages:
discrawl dms --last 20
4. Interactive Terminal TUI
A text-based interactive interface for browsing and filtering records:
discrawl tui --dm
5. Raw Read-Only SQL Queries
Supports read-only SQL statements for precise counting, joins, sorting and custom analytics:
discrawl --json sql "select count(*) as messages from messages;"
6. Archive Freshness Check
Before running analysis workflows, verify how up-to-date local archives are to decide whether a sync is required first:
discrawl status --json
3. Data Storage Paths
Discrawl follows the XDG Base Directory Specification for all stored assets:
- Database
- Linux:
~/.local/share/discrawl/discrawl.db - macOS:
~/Library/Application Support/discrawl/discrawl.db
- Linux:
- Config File: XDG config directory; legacy path
~/.discrawl/config.tomlis also supported - Cache & Logs: Stored separately under XDG cache and state directories
4. Two Data Source Modes
Discrawl offers two entirely separate methods for fetching Discord data:
1. Bot API Mode (Recommended)
Sync data via Discord’s official API using a configured Discord Bot Token. Administrative guild permissions are required to invite the Bot into target servers.
2. Wiretap Desktop Mode (Local Read-Only Only)
Extract cached data from the local Discord desktop client’s artifact files. Strict restrictions apply to this mode:
- No extraction of user credentials
- No usage of user tokens to call Discord’s API
- No writing to Discord’s local application storage
- DM cache data is for private local use only and must never be included in public Git snapshots
5. Integration with OpenClaw Agents
Within OpenClaw’s agent workflow, the Discrawl Skill follows a strict priority rule:
Local Discord archive data is used as the primary source to answer Discord-related queries. The Discord API is only called as a fallback if local archives are stale, missing requested data ranges, or the user explicitly requests live real-time context.
The agent first queries the local database, and only falls back to online API requests when local data is insufficient. This balances response quality while reducing API dependency and rate-limit risks.
6. ClawSweeper Sandbox Mode
Discrawl provides a restricted read-only sandbox binary
discrawl-sandbox for secure isolated data lookups with hard safeguards:- Imports archived data from the public
openclaw/discord-storerepository - Enforces
discord.token_source = "none"; no credentials are loaded or processed - Public Git snapshots only contain public channel data, with all sensitive information filtered out
7. Applicable Scenarios
- Community Operations: Offline audit, keyword statistics and member activity analysis for large Discord guilds
- Knowledge Retrieval: Instantly locate past technical solutions, team decisions and historical Q&A records
- Data Backup: Permanently archive critical server conversations locally to prevent permanent loss after message deletion on Discord
- AI Agent Enhancement: Equip OpenClaw AI agents with fast local Discord data lookup to boost response speed and factual accuracy