Xenon
Log in
Add to Discord

How to Export Discord Chat History

Save a channel's messages as JSON or CSV, or archive one and repost it somewhere else. Three different jobs get called export; here is which is which.

4 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, and it does not give a server owner a channel’s history at all.

So the options are third-party. Most of what you will find is a desktop application or a command-line tool that logs into your account with a user token. That works. It is also against Discord’s terms, and it asks you to paste a credential into something you downloaded. There is 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, 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 is 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 guild

Server settings, channels, roles, emojis and stickers as one JSON file. This is the one to run if you are 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: csv

Lists, 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 is a companion for reactions if you need who reacted with what.

What /export does not 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 is /chatlog, and it is Premium.

/chatlog create

Saves 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 backwards through a channel:

/chatlog create before: 1043...

Then to put it somewhere:

/chatlog load chatlog_id: 8FKD2LMQVA

Messages 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 is rate limiting, not a failure.

This is the part a file export cannot do. A JSON dump is a record; a chatlog goes back into Discord and reads like the channel did.

The limits, stated plainly

Chatlogs are copies. Reactions and edit history do not 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 cannot be loaded by anyone else or handed over.

/chatlog needs Premium; /export does not. 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. Full command reference in the documentation, or what backups cover if what you actually want is the whole server.

Try it on your own server

Xenon is free to add. Run /backup create before you change anything and every step in this post is reversible.

Keep reading