To migrate an existing Discord to https://chatto.run, I have generated a Discord...

@isotopp@infosec.exchange

To migrate an existing Discord to chatto.run, I have generated a Discord bot that will dump the whole server and all its history into an export directory.

Channels and Threads are created as directories, and then a subdirectory for each year is made in them. Inside, you will find a messages.jsonl, and a media directory will all downloads.

github.com/isotopp/discord-exp

To get this to run, you need to uv sync --managed-python, generate a discord bot in the Discord developer panel, register the bot, and configure the bot token into the .env file.

There are a few other parameters, Guild ID and the speed at which the download should happen.

The resulting structure is

<DISCORD_EXPORT_ROOT>/
├── server.json # Server metadata, roles, and custom emoji metadata
├── members.jsonl # One server-member record per line
├── channels.jsonl # One channel or thread record per line
├── manifest.json # Current/final status, channel completion, and failures
├── state.json # Resume state; keep this with the archive
├── media/
│ └── avatars/
│ └── <member-id>--<avatar-id>.<ext>
└── channels/
└── <safe-channel-name>--<channel-id>/
├── channel.json # Metadata plus this directory's archive_path
└── <year>/
├── messages.jsonl # Messages in timestamp order for that calendar year
└── media/
├── <message-id>--<attachment-id>--<filename>
└── <message-id>--embed-<hash>.<ext>

This is a good foundation for an archive, or for injection into your Discord replacement.

Once chatto.run supports my import, I'm going to inject this history into our new server.