DiscordChatExporter
DiscordChatExporter copied to clipboard
Store mention ID in JSON
Hello! First of all, thanks for this great piece of software.
I am doing some parsing of messages on a server where I need to be able to link mentions to their original user in a permanent way. The way DiscordChatExporter currently works, mentions only get exported as "@nickname", which is prone to change very quickly. Would it be possible to get the full user ID, at least in the JSON format? Since I assume most people using JSON are looking for a way to process the data later, I feel it would also make sense (if the Discord API exposes this data).
For the implementation, I would suggest having an additional field mentions
where all mentions present in the message/embed are dumped in sequential order. Something like this for example:
{
...
"content": "Hello @User1! Welcome to this server owned by @User2",
"mentions": [
{
"id": 01234567890123456,
"name": "User1",
"discriminator": "1234",
"nickname": "New User"
},
{
"id": 01234567890123457,
"name": "User2",
"discriminator": "5678",
"nickname": "The Owner"
},
],
...
}
Another option would be to store mentions in the original <@01234567890123456>
format. A similar change would also be helpful for identifying custom emoji.
This is something i think is needed, since it's just showin unknown everytime in exports, so having the id insted would be a life saver!
This is something i think is needed, since it's just showin unknown everytime in exports, so having the id insted would be a life saver!
That's related to #939
Closing in favor of #741. With that implemented, you'd be able to export without markdown parsing and get mention IDs inside the content
field.