nulldg / DiscordChatExporterPlus

Exports Discord chat logs to a file (without the political bloat)
MIT License
69 stars 2 forks source link

Something else you may want to debloat about this chat exporter #2

Open AZthemute opened 7 months ago

AZthemute commented 7 months ago

For some weird reason, there is no mode in the default program to simply export the raw JSON data. Instead, with JSON formatting, the data gets transformed to the point where some fields are missing. Attached is an example message, one transformed by the chat exporter and one that is completely raw from Discord's servers. msg.json msg-normal.json You can see that some fields are not present (author's premium type, author's flags, tts) or transformed (type, author's avatarurl, the names of fields like "isBot" which should be "bot") or are even incorrect ("0000" is not the same discriminator as "0")

I would do this myself, but I have no experience with C# so I couldn't understand how to skip the formatting and just output the response to a file directly. However the JSON data being transformed in some weird way always confused me why it's even a thing and it's why I don't use this program.

This SHOULD be a decently easy task, but I'm not sure because, again, I don't have experience with C#.

nulldg commented 7 months ago

that's a good idea, i'll look into it. DCE wasn't designed with this in mind because it's primarily designed to produce rich html files for offline viewing, and the json exporter was just bolted onto it.