DiscordChatExporter
DiscordChatExporter copied to clipboard
HTML --media option doesn't download emoji
Version
v2.28.0
Flavor
CLI (Command Line Interface)
Export format
HTML
Details
Using the HTML format with the --media
option doesn't download emojis. They remain as links to Discord servers and twemoji.maxcdn.com
. All emojis, especially custom ones, should be downloaded so that they're viewable offline or if the original Discord server is deleted.
Steps to reproduce
- Create a channel and post some messages containing single emojis.
- Export it with the HTML format and the
--media
option. - Open the generated HTML file.
The HTML file contains lines such as
<span class="preserve-whitespace"><img class="emoji emoji--large" alt="🎉" title="tada" src="https://twemoji.maxcdn.com/2/svg/1f389.svg"></span>
for Discord emojis and
<span class="preserve-whitespace"><img class="emoji emoji--large" alt="foo" title="foo" src="https://cdn.discordapp.com/emojis/858851733346582541.png"></span>
for custom emojis. The files directory doesn't contain the emojis.
I think all we're technically missing is ResolveUrlAsync(...)
here: https://github.com/Tyrrrz/DiscordChatExporter/blob/95cd6cb50cc1498a3512818c50f9990be0d01421/DiscordChatExporter.Core/Exporting/Writers/MarkdownVisitors/HtmlMarkdownVisitor.cs#L128-L137
However, the visitor processes nodes synchronously, so we need to find a way to transform the URLs at a later stage instead.
Interestingly the emoji reactions appear to be downloaded when using --media
.
Interestingly the emoji reactions appear to be downloaded when using
--media
.
Those are separate
First time user and I noticed this mismatch too between reactions downloading and custom emoji not. A bit of an archival bummer and would love to see this fixed.
(Btw thanks for all the hard work on this project guys! It's a shame discord doesn't export natively 😮💨)