How to export Discord chat history
Export a server's channels, roles, and bans as JSON or CSV, or archive a channel's messages and repost them somewhere else. Three different jobs get called export. Here's which is which.
3 min read
Discord has never shipped an export feature. Your data request under GDPR returns your own messages across every server in a format built for compliance rather than for reading. It doesn’t give a server owner a channel’s history at all.
So the options are third-party. Most of what you’ll find is a desktop application or a command-line tool that logs into your account with a user token. That works. It’s also against Discord’s terms, and it asks you to paste a credential into something you downloaded. There’s a simpler route if you just want the contents of a channel.
Which one do you want
Three different jobs get called “export”, and they have different answers:
- Structured data out of the server: channel lists, role lists, bans, or a specific message, as JSON or CSV.
/export, free. - A channel’s message history, archived and repostable: the actual conversation, kept and put back somewhere.
/chatlog, Premium. - The whole server, so it can be rebuilt: that’s a backup, not an export. How to back up a server covers it.
Structured exports
Add Xenon from the home page and run these in the server. Everything here is free.
/export guildServer settings, channels, roles, emojis, and stickers as one JSON file. This is the one to run if you’re moving to another tool, auditing a permission setup, or want a machine-readable record of what the server looked like.
/export channels format: csv/export roles format: csv/export bans format: csvLists, as JSON or CSV. The CSV opens in a spreadsheet, which is usually the point. A ban list or a role audit is something you want to sort and filter.
/export channel channel: #support/export role role: @Moderator/export message message: 1043...One item, in full, JSON only. /export message takes a message id or a URL,
and there’s a companion for reactions if you need who reacted with what.
What /export doesn’t give you is the conversation. It exports the shape of
the server and individual things you point at, not a channel’s history.
Archiving a channel’s messages
That’s /chatlog, and it’s Premium.
/chatlog createSaves the channel’s recent messages, author names, avatars, and embeds included,
and replies with a chatlog id. Up to 1,000 messages depending on tier.
/chatlog list shows what you have.
The reason this exists separately from a backup is reach. A backup spends its message budget across every channel in the server, so a busy support channel gets a slice of it. A chatlog spends all of it on one channel, which is what you want when the thing worth keeping is a single conversation.
To go further back than one chatlog holds, before takes a message id and
starts from there, so consecutive chatlogs can be chained backward through a
channel:
/chatlog create before: 1043...Then to put it somewhere:
/chatlog load chatlog_id: 8FKD2LMQVAMessages are reposted in order through a webhook, with the original author names and avatars, into any channel you administrate, on the same server or a different one. It can take a while, and the bot may appear to pause. That’s rate limiting, not a failure.
This is the part a file export can’t do. A JSON dump is a record. A chatlog goes back into Discord and reads like the channel did.
The limits
Chatlogs are copies. Reactions and edit history don’t survive a repost, and reposted messages carry the webhook’s identity wearing the original author’s name.
Attachments are links, not files. Discord’s own attachment URLs expire, so old files may not load on a repost. There is a documentation page on what that means in practice.
They belong to the account that made them. Like backups, a chatlog can’t be loaded by anyone else or handed over.
/chatlog needs Premium. /export doesn’t. If all you need is the
structure or a list, the free commands cover it.
Add Xenon and the /export commands are free to run. The full command
reference is in the documentation. Read what backups
cover if what you actually want is the whole server.