package.zipNavigate to User Settings > Data & Privacy
In Discord, click User Settings (gear icon next to your avatar), select Data & Privacy from the sidebar, and scroll down to Request my data.
Select "Messages" Only for Faster Delivery
Click Request Data. In the dialog, check Messages and uncheck everything else (Account, Activity, Ads, Servers, Support Tickets).
Confirm & Download the Archive
Submit your request. When Discord finishes packaging your messages, they will email you a download link for package.zip.