DiscordChatExporter/Readme.md

50 lines
1.7 KiB
Markdown
Raw Normal View History

2017-07-12 13:18:00 -04:00
# DiscordChatExporter
Command line executable that can export [Discord](https://discordapp.com) channel chat logs to a pretty HTML file.
2017-07-13 12:38:17 -04:00
## Screenshots
![](http://www.tyrrrz.me/projects/images/discordchatexporter_1.png)
2017-07-13 02:32:44 -04:00
## Features
2017-08-16 16:50:05 -04:00
- Produces output styled similar to the Discord's light theme
2017-07-13 02:32:44 -04:00
- Displays user avatars
2017-08-16 16:50:05 -04:00
- Groups messages by author and time
- Handles Discord markdown characters
- Converts URLs to links
- Inlines attached images with a link to the full version
- Inserts download links for other types of attached files
- Marks edited messages with a timestamp
2017-07-13 02:32:44 -04:00
2017-07-12 13:19:35 -04:00
## Usage
2017-07-12 13:18:00 -04:00
2017-08-28 16:28:10 -04:00
The program expects an access token and channel ID as parameters.
2017-07-12 13:18:00 -04:00
2017-08-28 16:28:10 -04:00
`DiscordChatExporter.exe /token:REkOTVqm9RWOTNOLCdiuMpWd.QiglBz.Lub0E0TZ1xX4ZxCtnwtpBhWt3v1 /channelId:459360869055190534`
2017-07-12 13:18:00 -04:00
2017-08-28 16:32:15 -04:00
#### Getting access token:
2017-07-12 13:18:00 -04:00
2017-08-28 16:28:10 -04:00
- Open Discord desktop or web client
- Press `Ctrl+Shift+I`
- Navigate to `Storage > LocalStorage > discordapp.com`
- Find the value for `token` and extract it
2017-08-28 16:32:15 -04:00
#### Getting channel ID:
2017-08-28 16:28:10 -04:00
- Open Discord desktop or web client
- Navigate to any DM or server channel
- Extract the current URL:
- If using desktop client, press `Ctrl+Shift+I`, type `window.location.href` in console and extract the result
- If using web client, just take the current URL from the address bar
- Pull the ID from the URL:
- If it's a DM channel, the format looks like this: `https://discordapp.com/channels/@me/CHANNEL_ID`
- If it's a server channel, the format looks like this:
`https://discordapp.com/channels/WHATEVER/CHANNEL_ID`
2017-07-12 13:18:00 -04:00
2017-07-12 13:19:35 -04:00
## Libraries used
2017-07-12 13:18:00 -04:00
- [HtmlAgilityPack](https://github.com/zzzprojects/html-agility-pack)
- [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json)
- [Tyrrrz.Extensions](https://github.com/Tyrrrz/Extensions)