How to use DiscordChatExporter to scrape / export Discord servers and DMs
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
:
Now, after downloading, using the tool is extremely simple:
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
:
In this case, the value we received is 600262311302922261
To find your account token, follow the manual below:
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 😅):
Let’s wait a bit…
And, about 20 minutes later, the scraping finished! (tip: for very large servers, just do the downloading while you sleep!)
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
And voila, now we have the fully scraped server within our fingertips.
To store the scraped data, I created a fresh Telegram channel:
And uploaded the scrapes (.zip
) to my channel:
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:
Packaged as .zip
:
Uploaded to Telegram:
You can repeat this process as many times as you’d like, effectively scraping the entirety of Discord!
Leave a comment