Discrawl needs a real Discord bot token to run sync or tail. Not a user token. The desktop wiretap import does not need any token.
- Create or reuse a Discord application in the Discord developer portal.
- Add a bot user to that application.
- Invite the bot to the target guilds.
- Enable these intents for the bot:
- Server Members Intent
- Message Content Intent
- Ensure the bot can at least:
- view channels
- read message history
Without those intents/permissions, sync, tail, member snapshots, and message content archiving will be partial or fail outright.
export DISCORD_BOT_TOKEN="your-bot-token"
discrawl doctorIf you keep shell secrets in ~/.profile, add the export there and reload your shell.
If you prefer the OS keyring, keep the token out of config and store it in the default keyring item:
# macOS Keychain
security add-generic-password -U -s discrawl -a discord_bot_token -w "$DISCORD_BOT_TOKEN"
# Linux Secret Service / libsecret
printf %s "$DISCORD_BOT_TOKEN" | secret-tool store --label="discrawl Discord bot token" service discrawl username discord_bot_token
# Windows Credential Manager
cmdkey /generic:discrawl:discord_bot_token /user:discord_bot_token /pass:%DISCORD_BOT_TOKEN%Set discord.token_source = "keyring" if you want to require the keyring and skip env entirely.
discrawl doctordoctor reports the token source (env or keyring), confirms bot auth, lists how many guilds the bot can access, and verifies the local DB plus FTS wiring. It does not print the token contents.
If you only want to import local Discord Desktop cache messages and not run a bot, skip everything above and run:
discrawl sync --source wiretapOr discrawl wiretap directly. See the wiretap guide.