How to use DiscordChatExporter to scrape / export Discord servers and DMs

2 minute read

Scraping Discord messages easily

In this tutorial, we’ll learn how to use DiscordChatExporter to scrape entire Discord servers / DMs (whatever you choose) very easily.

To start, go to DiscordChatExporter’s GitHub repository, and download the suitable release for your environment.

In my case, I downloaded the CLI version for x64 Windows, DiscordChatExporter.Cli.win-x64.zip:

release

Now, after downloading, using the tool is extremely simple:

release

To export an entire guild, you can use the following command template:

DiscordChatExporter.Cli exportguild --guild <value> --token <value> [options]

So let’s find now find the 2 values we need: the guild ID and our user account token.

First, to get the guild ID, right-click the server icon that you want to scape, and select Copy Server ID:

Finding guild ID

In this case, the value we received is 600262311302922261

To find your account token, follow the manual below:

Finding Discord account token

you can export the data using different formats like .txt, .json, etc using the -f option.

So the command we get is DiscordChatExporter.Cli exportguild -g 600262311302922261 -t <mytoken>.

Let’s run our command (token blurred for obvious reasons 😅):

Running our command

Let’s wait a bit…

Scraping finished successfully

And, about 20 minutes later, the scraping finished! (tip: for very large servers, just do the downloading while you sleep!)

Scraped files

As you can see, we’ve received neat .html files for every channel. (Note: you can export with different formats like .txt, .json, etc using the -f option!)

Let’s add our scraped data to a .zip archive

Packaging scraped files

And voila, now we have the fully scraped server within our fingertips.

To store the scraped data, I created a fresh Telegram channel:

Creating a Telegram channel

And uploaded the scrapes (.zip) to my channel:

Uploading scraped files

Telegram offers unlimited cloud storage (yes, you can literally upload as many files as you want).

The only practical limitation is a file size limit per message: 2GB or 4GB depending on your plan (Free or Premium). So to upload large amount of data, just split to multiple uploads of 2GB/4GB.

Here I scraped another big server, this time in .txt format:

Scraping another server

Packaged as .zip:

Scraping another server

Uploaded to Telegram:

Scraping another server

You can repeat this process as many times as you’d like, effectively scraping the entirety of Discord!

Categories:

Updated:

Leave a comment