Copilot eef0fc742d Encrypt Discord token at rest in settings file (machine-bound) (#1491)
* Initial plan

* Add token encryption when saving/loading settings

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Apply suggestion from @Tyrrrz

* Apply suggestion from @Tyrrrz

* Bind token encryption key to machine identity

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Switch to AES-GCM, hex encoding, and GetBytes/Fill improvements

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Address all review feedback: salt injection, code style, localization formatting

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Address latest review: ThisAssembly.Project, EnvironmentExtensions, inline Lazy, renames, localization wording

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Address latest review: layout comment, cipherSource, else block, MachineName fallback, csproj ordering

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Apply suggestion from @Tyrrrz

* Rename GetMachineId→TryGetMachineId, refactor Write to use single array with FillBytes

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Rename cipherSource→cipher in Read(), tokenBytes→tokenData in Write(), update layout comments

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Add cipherSource variable in Write(), update layout comment with size annotation

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Fix CSharpier formatting: inline multiline string assignments and reformat exception filter

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Quote EncryptionSalt argument to handle single quotes in secret value

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Revert double-quote fix on EncryptionSalt argument

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

* Apply suggestion from @Tyrrrz

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-27 14:01:25 +02:00
2023-02-16 23:16:04 +02:00
2025-11-11 19:46:22 +02:00
2025-05-10 03:03:55 +03:00
2023-05-26 20:40:45 +03:00
2023-05-26 20:40:45 +03:00
2025-11-11 19:46:22 +02:00
2025-12-06 19:20:21 +02:00
2022-04-22 17:03:03 +03:00
2025-11-24 17:58:06 +02:00

DiscordChatExporter

Status Made in Ukraine Build Coverage Release Downloads Pulls Discord Fuck Russia

Development of this project is entirely funded by the community. Consider donating to support!

Icon

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.

If you have questions or issues, please refer to the docs.

💬 If you want to chat, join my Discord server.

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):
  • Command-line interface (terminal app):
    • 🟢 Stable release: look for DiscordChatExporter.Cli.*.zip
    • 🟠 CI build: look for DiscordChatExporter.Cli.*.zip
    • 🐋 Docker: docker pull tyrrrz/discordchatexporter
    • 📦 AUR: discord-chat-exporter-cli
    • 📦 Nix: discordchatexporter-cli

Important

To launch the GUI version of the app on MacOS, you 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

If you're unsure which build is right for your system, consult with this page to determine your OS and CPU architecture.

Note

AUR and Nix packages linked above are maintained by the community. If you have any issues with them, please contact the corresponding maintainers.

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

channel list rendered output

See also

  • Chat Analytics — solution for analyzing chat patterns of Discord users, using exports produced by DiscordChatExporter.
  • DiscordChatExporter-frontend — convenient viewer for exports produced by DiscordChatExporter.
Languages
C# 91%
HTML 8.4%
PowerShell 0.3%
Dockerfile 0.3%