When a previous export crashes (OOM, abort, kill), the partially- downloaded temp export under .dce-temp/ was orphaned. Subsequent runs started the incremental from the archive's last message ID, re-downloading everything the failed run had already fetched. Now scrape_target() checks for orphaned temp exports before each channel export, salvages truncated JSON (same marker-based repair as salvage-truncated-export.sh), merges recovered messages into the archive, and cleans up stale temp dirs. The incremental then starts from the truly latest message. Adds salvage-stale smoke test with truncated fixture. |
||
|---|---|---|
| .assets | ||
| .compound-engineering | ||
| .docs | ||
| .github | ||
| config | ||
| DiscordChatExporter.Cli | ||
| DiscordChatExporter.Cli.Tests | ||
| DiscordChatExporter.Core | ||
| DiscordChatExporter.Gui | ||
| docs | ||
| scripts | ||
| .gitignore | ||
| Directory.Build.props | ||
| Directory.Packages.props | ||
| DiscordChatExporter.Cli.dockerfile | ||
| DiscordChatExporter.slnx | ||
| docker-compose.yml | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| favicon.icns | ||
| favicon.ico | ||
| favicon.png | ||
| global.json | ||
| License.txt | ||
| NuGet.config | ||
| Readme.md | ||
| scrape.env.example | ||
| STRATEGY.md | ||
DiscordChatExporter
| Development of this project is entirely funded by the community. Consider donating to support! |
DiscordChatExporter is an application that can be used to export message history from any Discord channel to a file. It works with direct messages, group messages, and server channels, and supports Discord's dialect of markdown as well as most other rich media features.
Warning
While DiscordChatExporter allows it, automating user accounts is against Discord TOS and may result in you getting banned. If possible, use a bot to export chat logs from accessible channels.
Terms of use[?]
By using this project or its source code, for any purpose and in any shape or form, you grant your implicit agreement to all the following statements:
- You condemn Russia and its military aggression against Ukraine
- You recognize that Russia is an occupant that unlawfully invaded a sovereign state
- You support Ukraine's territorial integrity, including its claims over temporarily occupied territories of Crimea and Donbas
- You reject false narratives perpetuated by Russian state propaganda
To learn more about the war and how you can help, click here. Glory to Ukraine! 🇺🇦
Download
- Graphical user interface (desktop app):
- 🟢 Stable release: look for
DiscordChatExporter.*.zip - 🟠 CI build: look for
DiscordChatExporter.*.zip - 📦 Scoop:
scoop install extras/discordchatexporter(community-maintained) - 📦 WinGet:
winget install Tyrrrz.DiscordChatExporter.GUI(community-maintained) - 📦 AUR:
yay -S discord-chat-exporter-gui(community-maintained) - 📦 Nix:
nix-shell -p discordchatexporter-desktop(community-maintained)
- 🟢 Stable release: look for
- Command-line interface (terminal app):
- 🟢 Stable release: look for
DiscordChatExporter.Cli.*.zip - 🟠 CI build: look for
DiscordChatExporter.Cli.*.zip - 🐋 Docker:
docker pull tyrrrz/discordchatexporter - 📦 WinGet:
winget install Tyrrrz.DiscordChatExporter.CLI(community-maintained) - 📦 AUR:
yay -S discord-chat-exporter-cli(community-maintained) - 📦 Nix:
nix-shell -p discordchatexporter-cli(community-maintained)
- 🟢 Stable release: look for
Important
To launch the GUI version of the app on MacOS, you may need to first remove the downloaded file from quarantine. You can do that by running the following command in the terminal:
xattr -rd com.apple.quarantine DiscordChatExporter.app.
Note
Community-maintained packages are published independently from this repository and may not always be up to date with the latest release.
Note
If you're unsure which build is right for your system, consult with this page to determine your OS and CPU architecture.
Features
- Cross-platform graphical and command-line interfaces
- Authentication via either a user or a bot token
- Multiple output formats: HTML (dark/light), TXT, CSV, JSON
- Support for markdown, attachments, embeds, emoji, and other rich media features
- File partitioning, date ranges, message filtering, and other export options
- Self-contained exports that can be viewed offline
Screenshots
See also
- Recurring Exports — append-only incremental JSON exports via Docker/cron (Linux/macOS). From the source repo:
./scripts/operator-handoff.sh, then./scripts/run-documents-scrape.sh; validate with./scripts/run-all-smokes.sh. GUI zip users: docs/gui-zip-recurring-scrape-bridge.md (copy to../DiscordChatExporter.linux-x64/RECURRING-SCRAPE.mdoptional). Maintainer summary: docs/recurring-scrape-merge-readiness.md. - Documented solutions — searchable learnings (append-only scrape, Docker/cron workflow); YAML frontmatter:
module,tags,problem_type - Chat Analytics — solution for analyzing chat patterns of Discord users, using exports produced by DiscordChatExporter.
- DiscordChatExporter-frontend — convenient viewer for exports produced by DiscordChatExporter.

