DiscordChatExporter
DiscordChatExporter copied to clipboard
Display server invites like it's done in Discord
Flavor
No response
Export format
HTML
Details
I have no clue if that's even doable with the data you can get from the Discord API and so on, but my idea here was to display the preview for server invites a bit more like it's done in Discord itself.
(for reference, here's how it looks on Discord)
(and in the HTML file it's just blank currently)
(the link obviously doesn't work anymore xD)
Yeah, not sure if there's any detailed information on the invite coming from the API. Will have to investigate.
@Tyrrrz the /invites/{invite_code}
endpoint exists
https://discord.com/api/invites/djs?with_counts=true
@Tyrrrz the
/invites/{invite_code}
endpoint exists discord.com/api/invites/djs?with_counts=true
Nice!
I think the best way to implement this is by adding a check in the link handler in the HTML markdown visitor:
https://github.com/Tyrrrz/DiscordChatExporter/blob/e00f126a5e39bcfed6f8fc405690d8b29b343676/DiscordChatExporter.Core/Exporting/Writers/MarkdownVisitors/HtmlMarkdownVisitor.cs#L110-L130
We already check for message links and emit special-case HTML, so we can do the same for invite links.
Added basic support for invite links, where it renders the guild icon, guild name, and channel name. Discord client currently renders online/total member count instead of channel name, but I feel like the former is more useful in an export.
Great, thanks. 👍