Clean up the docs more

pull/993/head
Tyrrrz 2 years ago
parent 7e2c78eabf
commit 374c7af48d

@ -4,7 +4,7 @@ Docker distribution of DiscordChatExporter provides a way to run the app in a vi
Note that only the CLI flavor of DiscordChatExporter is available for use with Docker.
### Pulling
## Pulling
This will download the [Docker image from the registry](https://hub.docker.com/r/tyrrrz/discordchatexporter) to your computer. You can run this command again to update when a new version is released.
@ -20,7 +20,7 @@ Note the `:stable` tag. DiscordChatExporter images are tagged according to the f
You can see all available tags [here](https://hub.docker.com/r/tyrrrz/discordchatexporter/tags?page=1&ordering=name).
### Usage
## Usage
To run the CLI in Docker and render help text:
@ -55,10 +55,11 @@ You can also use the current working directory as the output directory by specif
- `-v $PWD:/out` in Mac/Linux
- `-v $pwd.Path:/out` in PowerShell
For more information, please refer to the [Dockerfile](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/Dockerfile) and [Docker documentation](https://docs.docker.com/engine/reference/run/).<br>
For more information, please refer to the [Dockerfile](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/Dockerfile) and [Docker documentation](https://docs.docker.com/engine/reference/run/).
To get your Token and Channel IDs, please refer to [this page](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md).
### Environment variables
## Environment variables
DiscordChatExpoter CLI accepts environment variables as fallbacks for the `--token` and `--bot` options.
@ -70,11 +71,11 @@ Please refer to the Docker documentation for more information:
- [Docker run - Set environment variables](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file)
### Permission issues with Linux hosts
## Permission issues with Linux hosts
When bounding volumes between the container and the host, files mirrored from the Docker container will be owned by the Docker user (in most setups this is `root`). Please refer to this [issue comment](https://github.com/Tyrrrz/DiscordChatExporter/issues/800#issuecomment-1030471970) for instructions on how to override this behavior.
### Build Docker images for arm on Raspberry Pi
## Build Docker images for arm on Raspberry Pi
If you use the Docker image on arm (for example Raspberry Pi), you'd build the image as below.

@ -1,6 +1,7 @@
# Install .NET Core runtime
# Install .NET runtime
**.NET v7.0 Runtime** is required by **DiscordChatExporter v2.37 and newer**.
If you are using GUI flavor of DiscordChatExporter, the runtime will be installed automatically (since v2.27.1).
If you are using the CLI from Docker, installing the runtime on the host machine is not needed.
@ -19,8 +20,11 @@ If you are using the CLI from Docker, installing the runtime on the host machine
- [.NET v7.0 Runtime for **Macs with Apple silicon**](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-7.0.1-macos-arm64-installer)
- [.NET v7.0 Runtime for **Macs with an Intel processor**](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-7.0.1-macos-x64-installer)
> 💡 [How can I tell if my computer is running a 32-bit (x86) or a 64-bit (x64) version of Windows?](https://support.microsoft.com/help/15056/windows-32-64-bit-faq)
> 💡 [Is my Mac using an Intel processor or Apple silicon?](https://support.apple.com/HT211814)
> **Note**:
> [How can I tell if my computer is running a 32-bit (x86) or a 64-bit (x64) version of Windows?](https://support.microsoft.com/help/15056/windows-32-64-bit-faq)
> **Note**:
> [Is my Mac using an Intel processor or Apple silicon?](https://support.apple.com/HT211814)
**Otherwise:**
[Check out the latest version in this page](https://dotnet.microsoft.com/download/dotnet/7.0).
@ -30,7 +34,7 @@ Look for the download link in the '**.NET Runtime**' section, under **Installers
## Linux
**You only need to install .NET Core <u>Runtime</u> v7.0**
**You only need to install .NET Runtime v7.0**
Check out the instructions for your distro:
@ -46,17 +50,17 @@ Installing .NET Runtime is not needed. Please refer to the [Docker usage instruc
## Verify installation (optional)
You can check which version of **.NET Core** is installed by following these instructions:
You can check which version of **.NET Runtime** is installed by following these instructions:
#### Step 1
### Step 1
**Windows:** Open Command Prompt (aka `cmd`)
**macOS and Linux:** Open `Terminal`
#### Step 2
### Step 2
Run: `dotnet --info`
If **.NET Core Runtime** is correctly installed, the command will output the following:
If **.NET Runtime** is correctly installed, the command will output the following:
```

@ -1,5 +1,3 @@
# GUI, CLI and Formats explained
# Getting started
Welcome to the getting started page!
@ -10,7 +8,7 @@ If you still have unanswered questions after reading this page or if you have en
The information presented on this page is valid for **all** platforms.
# GUI or CLI?
## GUI or CLI?
![](https://i.imgur.com/j9OTxRB.png)
**DCE** has two different versions:
@ -25,7 +23,7 @@ If you're not comfortable with **Windows'** Command Line (cmd), please choose th
**(Skip to [Using the CLI](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#using-the-cli) or [File Formats](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#file-formats))**
# Using the GUI
## Using the GUI
### Video tutorial
@ -35,27 +33,31 @@ If you're not comfortable with **Windows'** Command Line (cmd), please choose th
### Guide
**1.** After extracting the `.zip`, open `DiscordChatExporter.exe`
1. After extracting the `.zip`, open `DiscordChatExporter.exe`
2. Please refer to the on-screen instructions to get your token, then paste your token in the upper text box and hit ENTER or click the arrow (→).
**2.** Please refer to the on-screen instructions to get your token, then paste your token in the upper text box and hit ENTER or click the arrow (→).
**NEVER SHARE YOUR TOKEN**. A token gives <u>full access</u> to an account, treat it like a password.
> **Warning**:
> **Never share your token!**
> A token gives full access to an account, treat it like a password.
<img src="https://i.imgur.com/SuLQ5tZ.png" height="400"/>
**3.** DCE will display your Direct Messages and a sidebar with your server list. Select the channel you would like to export, then click the ![](https://i.imgur.com/dnTOlDa.png) button to continue.
3. DCE will display your Direct Messages and a sidebar with your server list. Select the channel you would like to export, then click the ![](https://i.imgur.com/dnTOlDa.png) button to continue.
> 💡 Tip: You can export multiple channels at once by holding `CTRL` or `SHIFT` while selecting.
> **Note**:
> You can export multiple channels at once by holding `CTRL` or `SHIFT` while selecting.
> You can also double-click a channel to export it without clicking the ![](https://i.imgur.com/dnTOlDa.png) button.
<img src="https://i.imgur.com/JHMFRh2.png" height="400"/>
**4.** In this screen you can customize the following:
4. In this screen you can customize the following:
- **Export format** - HTML (Dark), HTML (Light), TXT, CSV and JSON
Click the menu button (☰) to see more options:
- **Date range (after/before)** (Optional) - If set, only messages sent in the provided date range will be exported. Only one value (either after or before) is required if you want to use this option.
> **Note**:
> Please note that the time defaults to **12:00 AM** (midnight/00:00). This means that if you choose to export between Sep 17th and Sep 18th, messages from Sep 18th won't be exported.
- **Filter** (Optional) - Special notation for filtering the messages that get included in the export. See [Message filters](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Message-filters.md) for more info.
- **Messages per partition** (Optional) - Split output into partitions, each limited to this number of messages (e.g. 100) or file size (e.g. 10mb). For example, a channel with 36 messages set to be partitioned every 10 messages will output 4 files.
@ -63,7 +65,7 @@ Click the menu button (☰) to see more options:
Only files that are referenced by the export are downloaded, which means that, for example, user avatars will not be downloaded when using the plain text (TXT) export format.
A folder containing the assets will be created along with the exported chat. They must be kept together.
**5.** Click `EXPORT` to export.
5. Click `EXPORT` to export.
<img src="https://i.imgur.com/KPgMH2D.png" height="400"/><img src="https://i.imgur.com/mtUFojS.png" height="400"/>
@ -73,7 +75,8 @@ Click the menu button (☰) to see more options:
Perform automatic updates on every launch.
Default: Enabled
> 💡 Tip: Keep this option enabled to receive the latest features and bug fixes!
> **Note**:
> Keep this option enabled to receive the latest features and bug fixes!
**Dark mode**
Use darker colors in the UI (User Interface).
@ -105,18 +108,20 @@ More info about .NET date formats [here](https://docs.microsoft.com/en-us/dotnet
The number of channels can be exported at the same time.
Default: 1
> 💡 Tip: Try to keep this number low so that your account doesn't get flagged.
> **Note**:
> Try to keep this number low so that your account doesn't get flagged.
**(Skip to [File Formats](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#file-formats))**
# Using the CLI
## Using the CLI
> **Note**:
> Make sure you have [.NET Core installed](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Dotnet.md) before attempting to run the commands below.
> **Docker** users, please refer to the [Docker usage instructions](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Docker.md).
**1.** After extracting the `.zip`, open Command Prompt, aka `cmd` (`Terminal` on **macOS** and **Linux**).
1. After extracting the `.zip`, open Command Prompt, aka `cmd` (`Terminal` on **macOS** and **Linux**).
**2.** Change the current directory to DCE's folder with `cd C:\path\to\directory`, then press ENTER to run the command.
2. Change the current directory to DCE's folder with `cd C:\path\to\directory`, then press ENTER to run the command.
**Windows** users can quickly get the directory's path by clicking the address bar while inside the folder.
![](https://i.imgur.com/XncnhC2.gif)
@ -125,7 +130,7 @@ Default: 1
You can also drag and drop the folder on **every platform**.
![](https://i.imgur.com/sOpZQAb.gif)
**3.** Now we're ready to run the commands. The examples on this page follow the Windows file path format, change the file paths according to your system.
3. Now we're ready to run the commands. The examples on this page follow the Windows file path format, change the file paths according to your system.
Let's do the following to list DCE's options:
@ -137,7 +142,7 @@ dotnet DiscordChatExporter.Cli.dll
> **Docker** users, please refer to the [Docker usage instructions](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Docker.md).
## DCE.CLI commands
### DCE.CLI commands
| Command | Description |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
@ -157,7 +162,7 @@ To get help with a specific command, please run:
dotnet DiscordChatExporter.Cli.dll command -h
```
## export
#### `export`
| | Option | Description |
| ------ | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@ -174,11 +179,12 @@ dotnet DiscordChatExporter.Cli.dll command -h
| | [--dateformat](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#date-formats) | Format used when writing dates. |
| | -h | Shows help text |
> **Note**:
> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
With this command you can export Server Channels and Direct Messages.
### Basic usage
##### Basic usage
You can quickly export with DCE's default settings by using just `-t token` and `-c channelid`.
@ -186,7 +192,7 @@ You can quickly export with DCE's default settings by using just `-t token` and
dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555
```
### Changing the format
##### Changing the format
You can change the export format to `HtmlDark`, `HtmlLight`, `PlainText` `Json` or `Csv` with `-f format`. The default format is `HtmlDark`.
@ -194,7 +200,7 @@ You can change the export format to `HtmlDark`, `HtmlLight`, `PlainText` `Json`
dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -f Json
```
### Changing the output filename
##### Changing the output filename
You can change the filename by using `-o name.ext`. e.g. for the `HTML` format:
@ -202,7 +208,7 @@ You can change the filename by using `-o name.ext`. e.g. for the `HTML` format:
dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -o myserver.html
```
### Changing the output directory
##### Changing the output directory
You can change the export directory by using `-o` and providing a path that ends with a slash or does not have a file extension.
If any of the folders in the path have a space in its name, escape them with quotes (").
@ -211,7 +217,7 @@ If any of the folders in the path have a space in its name, escape them with quo
dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports"
```
### Changing the filename and output directory
##### Changing the filename and output directory
You can change both the filename and export directory by using `-o directory\name.ext`.
Note that the filename must have an extension, otherwise it will be considered a directory name.
@ -221,7 +227,7 @@ If any of the folders in the path have a space in its name, escape them with quo
dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports\myserver.html"
```
### Generating the filename and output directory dynamically
##### Generating the filename and output directory dynamically
You can use template tokens to generate the output file path based on the guild and channel metadata.
@ -245,7 +251,7 @@ Here is the full list of supported template tokens:
- `%b` - the "before" date
- `%%` - escapes `%`
### Partitioning
##### Partitioning
You can use partitioning to split files after a given number of messages or file size.
For example, a channel with 36 messages set to be partitioned every 10 messages will output 4 files.
@ -260,7 +266,7 @@ A 45mb channel set to be partitioned every 20mb will output 3 files.
dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -p 20mb
```
### Downloading assets
##### Downloading assets
If this option is set, the export will include additional files such as user avatars, attached files, images, etc.
Only files that are referenced by the export are downloaded, which means that, for example, user avatars will not be downloaded when using the plain text (TXT) export format.
@ -270,7 +276,7 @@ A folder containing the assets will be created along with the exported chat. The
dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 --media
```
### Reuse assets
##### Reuse assets
Previously downloaded assets can be reused to skip redundant downloads as long as the chat is always exported to the same folder. Using this option can speed up future exports. This option requires the `--media` option.
@ -278,7 +284,7 @@ Previously downloaded assets can be reused to skip redundant downloads as long a
dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 --media --reuse-media
```
### Date formats
##### Date formats
This setting changes how dates are formatted in the exported files.
@ -299,7 +305,7 @@ dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 --dateformat "y
> Special thanks to [@andrewkolos](https://github.com/andrewkolos) for adding the Unix options
### Date ranges
##### Date ranges
**Messages sent before a date**
Use `--before` to export messages sent before the provided date. E.g. messages sent before September 18th, 2019:
@ -326,7 +332,7 @@ You can try different formats like `17-SEP-2019 11:34 PM` or even refine your ra
Don't forget to quote (") the date if it has spaces!
More info about .NET date formats [here](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings).
## exportdm
#### `exportdm`
| | Option | Description |
| ------ | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@ -343,11 +349,12 @@ More info about .NET date formats [here](https://docs.microsoft.com/en-us/dotnet
| | [--dateformat](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#date-formats) | Date format used in output |
| | -h | Shows help text |
> **Note**:
> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
This command exports all your Direct Messages.
## exportguild
#### `exportguild`
| | Option | Description |
| ------ | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@ -365,11 +372,12 @@ This command exports all your Direct Messages.
| | [--dateformat](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#date-formats) | Date format used in output |
| | -h | Shows help text |
> **Note**:
> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
This command exports all channels of a Server.
## exportall
#### `exportall`
| | Option | Description |
| ------ | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@ -387,6 +395,7 @@ This command exports all channels of a Server.
| | [--dateformat](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#date-formats) | Date format used in output |
| | -h | Shows help text |
> **Note**:
> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
This command exports all accessible channels, including server channels and DMs.
@ -397,7 +406,7 @@ To exclude DMs, add the `--include-dm false` option:
dotnet DiscordChatExporter.Cli.dll exportall -t "mfa.Ifrn" --include-dm false
```
## channels
#### `channels`
| | Option | Description |
| ------ | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@ -405,6 +414,7 @@ dotnet DiscordChatExporter.Cli.dll exportall -t "mfa.Ifrn" --include-dm false
| **\*** | [-t](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#basic-usage) | [Authorization token](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md#how-to-get-user-token). Environment variable: `DISCORD_TOKEN` |
| | -h | Shows help text |
> **Note**:
> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
This command outputs the server channels in the following format:
@ -415,13 +425,14 @@ To save the output to a file, run the command below. If the file already exists,
dotnet DiscordChatExporter.Cli.dll channels -t "mfa.Ifrn" -g 21814 > C:\path\to\output.txt
```
## dm
#### `dm`
| | Option | Description |
| ------ | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **\*** | [-t](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#basic-usage) | [Authorization token](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md#how-to-get-user-token). Environment variable: `DISCORD_TOKEN` |
| | -h | Shows help text |
> **Note**:
> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
This command outputs the list of Direct Messages.
@ -431,13 +442,14 @@ To save the output to a file, run the command with `> C:\path\…` like the exam
dotnet DiscordChatExporter.Cli.dll dm -t "mfa.Ifrn" > C:\path\to\output.txt
```
## guilds
#### `guilds`
| | Option | Description |
| ------ | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **\*** | [-t](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#basic-usage) | [Authorization token](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md#how-to-get-user-token). Environment variable: `DISCORD_TOKEN` |
| | -h | Shows help text |
> **Note**:
> Options with an asterisk (**\***) are required. The order of the options doesn't matter.
This command outputs a list of your Server List.
@ -447,37 +459,38 @@ To save the output to a file, run the command with `> C:\path\…` like the exam
dotnet DiscordChatExporter.Cli.dll guilds -t "mfa.Ifrn" > C:\path\to\output.txt
```
## guide
#### `guide`
This command explains [how to get your token, guild, and channel IDs](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md).
# File formats
## File formats
## HTML
### HTML
![](https://i.imgur.com/S7lBTkV.png)
The HTML format replicates Discord's interface, making it the most user-friendly option.
It's the best format for attachment preview and sharing.
You can open `.html` files with a web browser, such as Google Chrome.
> Please note that if a picture is deleted, or if a user changes its avatar, the respective images will no longer be displayed.
> **Warning**:
> If a picture is deleted, or if a user changes its avatar, the respective images will no longer be displayed.
> Export using the "Download referenced assets" (`--media`) option to avoid this.
## Plain Text
### Plain Text
<img src="https://i.imgur.com/PbUyRXD.png" height="400"/>
The Plain Text format is the best option for archiving due to its small size.
You can open `.txt` files with a text editor, such as Notepad.
## JSON
### JSON
<img src="https://i.imgur.com/FAeSA4O.png" height="400"/>
The JSON format contains more technical information and is easily parsable.
You can open `.json` files with a text editor, such as Notepad.
## CSV
### CSV
![](https://i.imgur.com/VEVUsKs.png)
![](https://i.imgur.com/1vPmQqQ.png)
@ -487,7 +500,7 @@ You can open `.csv` files with a text editor, such as Notepad, or a spreadsheet
**([Back to top](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#getting-started))**
#
---
Further reading: [.NET date formats](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings)
Special thanks to [@Yudi](https://github.com/Yudi)

@ -1,20 +1,21 @@
# Linux usage instructions
### Step 1: Install .NET Core Runtime
## Installing .NET Runtime
Please follow the [instructions provided here](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Dotnet.md).
### Step 2: Downloading and using DiscordChatExporter.Cli
## Downloading and using DiscordChatExporter.Cli
**1.** Download [DiscordChatExporter.CLI.zip](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest) and extract it to a folder.<br/>
**2.** Open Terminal.<br/>
**3.** `cd` into the extracted folder. You can do this in Terminal by typing `cd`, then press the SPACE key, drag and drop the extracted folder into the Terminal window, and press the ENTER key.<br/>
**4.** Replace `TOKEN` and `CHANNEL`, then execute this command to export:
1. Download [DiscordChatExporter.CLI.zip](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest) and extract it to a folder.
2. Open Terminal.
3. `cd` into the extracted folder. You can do this in Terminal by typing `cd`, then press the SPACE key, drag and drop the extracted folder into the Terminal window, and press the ENTER key.
4. Replace `TOKEN` and `CHANNEL`, then execute this command to export:
```
dotnet DiscordChatExporter.Cli.dll export -t TOKEN -c CHANNEL
```
> 💡 Tip: [How to get Token and Channel IDs](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md).
> **Note**:
> [How to get Token and Channel IDs](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md).
There's much more you can do with DCE.CLI! Read the [CLI explained](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#dcecli-commands-) page to get started.

@ -2,19 +2,22 @@
![Might look different depending on your macOS version](https://i.imgur.com/gA8jFjJ.png)
### Step 1: Install .NET Core Runtime
## Installing .NET Runtime
Please follow the [instructions provided here](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Dotnet.md).
### Step 2: Downloading and using DiscordChatExporter.Cli
## Downloading and using DiscordChatExporter.Cli
**1.** Download [DiscordChatExporter.CLI.zip](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest) and extract it to a folder.<br/>
**2.** Search for `Terminal.app` in Spotlight (⌘+SPACE), then open it.<br/>
**3.** In the Terminal window, type `cd` , press the SPACE key, then drag and drop the extracted folder into the window, then press the RETURN key.<br/>
**4.** Execute the following command to export, replacing `TOKEN` and `CHANNEL` with your own values:
1. Download [DiscordChatExporter.CLI.zip](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest) and extract it to a folder.
2. Search for `Terminal.app` in Spotlight (⌘+SPACE), then open it.
3. In the Terminal window, type `cd` , press the SPACE key, then drag and drop the extracted folder into the window, then press the RETURN key.
4. Execute the following command to export, replacing `TOKEN` and `CHANNEL` with your own values:
dotnet DiscordChatExporter.Cli.dll export -t TOKEN -c CHANNEL
```
dotnet DiscordChatExporter.Cli.dll export -t TOKEN -c CHANNEL
```
> 💡 Tip: [How to get Token and Channel IDs](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md).
> **Note**:
> [How to get Token and Channel IDs](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md).
There's much more you can do with DCE.CLI! Read the [CLI explained](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#dcecli-commands-) page to get started.

@ -1,28 +1,19 @@
# Home
<p align="center">
<img src="https://i.imgur.com/IkrFoA0.png" height="120" />
<br>
<b>DiscordChatExporter</b> can be used to export message history from a Discord channel to a file.
</p>
## Installation & Usage
**Step 1:** [Get .NET Core Runtime](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Dotnet.md) (Required for CLI; Installed automatically for GUI; Not required in Docker)
**Step 2:** [Windows](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#gui-or-cli) | [macOS](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/MacOS.md) | [Linux](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Linux.md) | [Docker](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Docker.md)
**Step 3:** Getting Started:
- [Using the GUI](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#using-the-gui)
- [Using the CLI](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#using-the-cli)
- [File formats](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#file-formats)
- [Get .NET Core Runtime](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Dotnet.md) (Required for CLI; Installed automatically for GUI; Not required in Docker)
- [Windows](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#gui-or-cli) | [macOS](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/MacOS.md) | [Linux](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Linux.md) | [Docker](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Docker.md)
- Getting started:
- [Using the GUI](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#using-the-gui)
- [Using the CLI](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#using-the-cli)
- [File formats](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Getting-started.md#file-formats)
## Guides
- [How to get Token and Channel IDs](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md)
- [How to use message filters](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Message-filters.md)
- **Export Scheduling with CLI**
- Export scheduling with CLI:
- [Windows](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/scheduling-windows.md)
- [macOS](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/scheduling-MacOS.md)
- [Linux](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/scheduling-Linux.md)

@ -4,13 +4,14 @@ Make sure you already have **DiscordChatExporter.CLI** and **.NET Core** properl
You can use Cron on macOS, but [this method](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/scheduling-MacOS.md) is preferred.
#
---
**1.** Open Terminal and create a new text file with `nano /path/to/DiscordChatExporter/cron.sh`<br/>
1. Open Terminal and create a new text file with `nano /path/to/DiscordChatExporter/cron.sh`
> For beginners: You can't use your mouse in nano, use the arrow keys to control the cursor (caret).
> **Note**:
> You can't use your mouse in nano, use the arrow keys to control the cursor (caret).
**2.** Paste the following into the text file:
2. Paste the following into the text file:
```bash
#!/bin/bash
@ -63,51 +64,49 @@ fi
exit 0
```
**3.** Replace:
3. Replace:
`tokenhere` with your [Token](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md).
- `tokenhere` with your [Token](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md).
- `channelhere` with a [Channel ID](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md).
- `dceFOLDERpathhere` with DCE's **directory path** (e.g. `/path/to/folder`, NOT `/path/to/folder/DiscordChatExporter.dll`).
- `filenamehere` with the exported channel's filename, without spaces.
- `dirhere` with the export directory (e.g. /home/user/Documents/Discord\ Exports).
- `formathere` with one of the available export formats.
`channelhere` with a [Channel ID](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md).
> **Note**:
> Remember to escape spaces (add `\` before them) or to quote (") the paths (`"/home/my user"`)!
`dceFOLDERpathhere` with DCE's **directory path** (e.g. `/path/to/folder`, NOT `/path/to/folder/DiscordChatExporter.dll`).
> **Note**:
> To save, hold down CTRL and then press O, if asked for a filename, type it and press ENTER. Hit CTRL+X to exit the text editor.
> [Check out this page](https://wiki.gentoo.org/wiki/Nano/Basics_Guide) if you want to know more about nano.
`filenamehere` with the exported channel's filename, without spaces.
4. Make your script executable with `chmod +x /path/to/DiscordChatExporter/cron.sh`
`dirhere` with the export directory (e.g. /home/user/Documents/Discord\ Exports).
5. Let's edit the cron file. If you want to run the script with your user privileges, edit it by running `crontab -e`. If you want to run the script as root, edit it with `sudo crontab -e`. If this is your first time running this command, you might be asked to select a text editor. Nano is easier for beginners.
`formathere` with one of the available export formats.
6. Add the following to the end of the file `* * * * * /path/to/DiscordChatExporter/cron.sh >/tmp/discordchatexporter.log 2>/tmp/discordchatexportererror.log`. Don't forget to replace the `/path/to/DiscordChatExporter/cron.sh`!
**Remember to escape spaces** (add `\` before them) or to quote (") the paths (`"/home/my user"`)!<br/>
> For beginners: To save, hold down CTRL and then press O, if asked for a filename, type it and press ENTER. Hit CTRL+X to exit the text editor.<br/> > [Check out this page](https://wiki.gentoo.org/wiki/Nano/Basics_Guide) if you want to know more about nano.
**4.** Make your script executable with `chmod +x /path/to/DiscordChatExporter/cron.sh`
**5.** Let's edit the cron file. If you want to run the script with your user privileges, edit it by running `crontab -e`. If you want to run the script as root, edit it with `sudo crontab -e`.<br/>
If this is your first time running this command, you might be asked to select a text editor. Nano is easier for beginners.
**6.** Add the following to the end of the file `* * * * * /path/to/DiscordChatExporter/cron.sh >/tmp/discordchatexporter.log 2>/tmp/discordchatexportererror.log`<br/>
Don't forget to replace the `/path/to/DiscordChatExporter/cron.sh`!
> 💡 Tip: If you don't want logs to be created, replace both `/tmp/discordchatexporter.log` with `/dev/null`
> **Note**:
> If you don't want logs to be created, replace both `/tmp/discordchatexporter.log` with `/dev/null`.
Then replace the \*s according to:
![](https://i.imgur.com/RY7USM6.png)
#
---
**Examples**:
**Examples**<br/>
If you want to execute the script at minute 15 of every hour: `15 * * * *`<br/>
Every 30 minutes `*/30 * * * *`<br/>
Everyday at midnight `0 0 * * *`<br/>
Everyday at noon `0 12 * * *`<br/>
Everyday at 3, 4 and 6 PM `0 15,16,18 * * *`<br/>
Every Wednesday at 9 AM `0 9 * * 3`
- If you want to execute the script at minute 15 of every hour: `15 * * * *`
- Every 30 minutes `*/30 * * * *`
- Every day at midnight `0 0 * * *`
- Every day at noon `0 12 * * *`
- Every day at 3, 4 and 6 PM `0 15,16,18 * * *`
- Every Wednesday at 9 AM `0 9 * * 3`
Verify your cron time [here](https://crontab.guru).
#
---
**Extra information**
@ -115,12 +114,13 @@ The week starts on Sunday. 0 = SUN, 1 = MON ... 7 = SUN.
Be aware that if you set the day to '31', the script will only run on months that have the 31st day.
> 💡 Tip: [Learn more about running a cron job on the last day of the month here](https://stackoverflow.com/questions/6139189/cron-job-to-run-on-the-last-day-of-the-month) (expert).
> **Note**:
> [Learn more about running a cron job on the last day of the month here](https://stackoverflow.com/questions/6139189/cron-job-to-run-on-the-last-day-of-the-month) (expert).
The default filename for the exported channel is `YYYY-MM-DD-hh-mm-ss-yourfilename`. You can change it if you'd like.
Don't forget to update your token in the script after it has been reset!
#
---
Special thanks to [@Yudi](https://github.com/Yudi)

@ -4,22 +4,15 @@ Scheduling on macOS is a bit tricky, but it should work if you follow the instru
Make sure you already have **DiscordChatExporter.CLI** and **.NET Core** properly installed ([instructions here](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/macOS-usage-instructions.md)).
- [**1.** Creating the script](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/scheduling-MacOS.md#1-creating-the-script)
- [**2.** Creating the .plist file](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/scheduling-MacOS.md#2-creating-the-plist-file)
- [Export on System Boot/User Login](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/scheduling-MacOS.md#export-on-system-bootuser-login)
- [Export every _n_ seconds](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/scheduling-MacOS.md#export-every-n-seconds)
- [Export at a specific time and date](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/scheduling-MacOS.md#export-at-a-specific-time-and-date)
- [**3.** Loading the .plist into launchctl](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/scheduling-MacOS.md#3-loading-the-plist-into-launchctl)
## Creating the script
## 1. Creating the script
1. Open TextEdit.app and create a new file
**1.** Open TextEdit.app and create a new file
**2.** Convert the file to a plain text one in 'Format > Make Plain Text' (⇧⌘T)
2. Convert the file to a plain text one in 'Format > Make Plain Text' (⇧⌘T)
![](https://i.imgur.com/WXrTtXM.png)
**3.** Paste the following into the text editor:
3. Paste the following into the text editor:
```bash
#!/bin/bash
@ -75,18 +68,14 @@ fi
exit 0
```
**4.** Replace:
`tokenhere` with your [Token](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md)
`channelhere` with a [Channel ID](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md)
`dceFOLDERpathhere` with DCE's **directory's path** (e.g. `/Users/user/Desktop/DiscordChatExporterFolder`, NOT `/Users/user/Desktop/DiscordChatExporterFolder/DiscordChatExporter.DLL`)
`filenamehere` with the exported channel's filename, without spaces
4. Replace:
`dirhere` with the directory you want the files to be saved at (e.g. `/Users/user/Documents/Discord\ Exports`)
`formathere` with one of the available export formats
- `tokenhere` with your [Token](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md)
- `channelhere` with a [Channel ID](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md)
- `dceFOLDERpathhere` with DCE's **directory's path** (e.g. `/Users/user/Desktop/DiscordChatExporterFolder`, NOT `/Users/user/Desktop/DiscordChatExporterFolder/DiscordChatExporter.DLL`)
- `filenamehere` with the exported channel's filename, without spaces
- `dirhere` with the directory you want the files to be saved at (e.g. `/Users/user/Documents/Discord\ Exports`)
- `formathere` with one of the available export formats
To quickly get file or folder paths, select the file/folder, then hit Command+I (⌘I) and copy what's after `Where:`.
After copying and pasting, make sure the file/folder name is not missing. If a folder has spaces in its name, add `\` before the spaces, like in the example below:
@ -101,11 +90,10 @@ After copying and pasting, make sure the file/folder name is not missing. If a f
![](https://i.imgur.com/29u6Nyx.png)
**5.** Save the file as `filename.sh`, not `.txt`
**6.** Open Terminal.app, type `chmod +x`, press the SPACE key, then drag & drop the `filename.sh` into the Terminal window and hit RETURN. You may be prompted for your password, and you won't be able to see it as you type.
5. Save the file as `filename.sh`, not `.txt`
6. Open Terminal.app, type `chmod +x`, press the SPACE key, then drag & drop the `filename.sh` into the Terminal window and hit RETURN. You may be prompted for your password, and you won't be able to see it as you type.
## 2. Creating the .plist file
## Creating the .plist file
Open TextEdit, make a Plain Text (⇧⌘T) and then paste the following into it:
@ -124,9 +112,7 @@ Open TextEdit, make a Plain Text (⇧⌘T) and then paste the following into it:
```
- The `Label` string is the name of the export job, it must be something unique. Replace the `local.discordchatexporter` between the `<string>` with another name if you'd like to run more than one script.
- The `Program` string is the path to the script. Replace `/path/to/filename.sh` between the `<string>` with the path of the previously created script.
- Replace the `REPLACEME` with the content presented in the following sections according to <u>when</u> you want to export.
When you're done, save the file with the same name as the `Label` and with the `.plist` extension (not `.txt`), like `local.discordchatexporter.plist`.
@ -230,9 +216,9 @@ Every Sunday at midnight and every Wednesday full hour (xx:00). Notice the inclu
</array>
```
## 3. Loading the .plist into launchctl
## Loading the .plist into launchctl
**1.** Copy your `filename.plist` file to one of these folders according to how you want it to run:
1. Copy your `filename.plist` file to one of these folders according to how you want it to run:
- `~/Library/LaunchAgents` runs as the current logged-in user.
@ -247,7 +233,7 @@ Every Sunday at midnight and every Wednesday full hour (xx:00). Notice the inclu
To quickly go to these directories, open Finder and press Command+Shift+G (⌘⇧G), then paste the path into the text box.
**2.** To load the job into launchctl, in Terminal, type `launchctl load`, press SPACE, drag and drop the `.plist` into the Terminal window, then hit RETURN. It won't output anything if it was successfully loaded.
2. To load the job into launchctl, in Terminal, type `launchctl load`, press SPACE, drag and drop the `.plist` into the Terminal window, then hit RETURN. It won't output anything if it was successfully loaded.
### Extra launchctl commands
@ -270,7 +256,7 @@ You can also see error codes (2nd number) by running this command.
launchctl list | grep local.discordchatexporter
```
#
---
Further reading: [Script management with launchd in Terminal on Mac](https://support.apple.com/guide/terminal/script-management-with-launchd-apdc6c1077b-5d5d-4d35-9c19-60f2397b2369/mac) and [launchd.info](https://launchd.info/).
Special thanks to [@Yudi](https://github.com/Yudi)

@ -2,7 +2,7 @@
We'll be using [DiscordChatExporter CLI](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest), PowerShell, and Task Scheduler.
**1.** Open a text editor such as Notepad and paste:
1. Open a text editor such as Notepad and paste:
```powershell
# Info: https://github.com/Tyrrrz/DiscordChatExporter/wiki
@ -29,54 +29,47 @@ ElseIf($EXPORTFORMAT -match "Csv"){mv "$FILENAME.tmp" -Destination "$EXPORTDIREC
exit
```
**2.** Replace:
2. Replace:
`tokenhere` with your [Token](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md)
`channelhere` with a [Channel ID](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md)
`exefolderhere` with the .exe **directory's path** (e.g. C:\Users\User\Desktop\DiscordChatExporter)
`filenamehere` with a filename without spaces
`dirhere` with the export directory (e.g. C:\Users\User\Documents\Exports)
`formathere` with one of the available export formats
- `tokenhere` with your [Token](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md)
- `channelhere` with a [Channel ID](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md)
- `exefolderhere` with the .exe **directory's path** (e.g. C:\Users\User\Desktop\DiscordChatExporter)
- `filenamehere` with a filename without spaces
- `dirhere` with the export directory (e.g. C:\Users\User\Documents\Exports)
- `formathere` with one of the available export formats
Make sure not to delete the quotes (")
**3.** Save the file as `filename.ps1` not `.txt`
3. Save the file as `filename.ps1` not `.txt`
## Export at Startup
**1.** Press Windows + R, type `shell:startup` and press ENTER
**2.** Paste `filename.ps1` or a shortcut into this folder
1. Press Windows + R, type `shell:startup` and press ENTER
2. Paste `filename.ps1` or a shortcut into this folder
## Scheduling with Task Scheduler
Please notice your computer must be turned on so the exportation can occur.
**1.** Press Windows + R, type `taskschd.msc` and press ENTER
**2.** Select `Task Scheduler Library`, create a Basic Task, and follow the instructions on-screen
1. Press Windows + R, type `taskschd.msc` and press ENTER
2. Select `Task Scheduler Library`, create a Basic Task, and follow the instructions on-screen
<img src="https://i.imgur.com/MHRVGDi.png" height="500"/>
[ ![](https://i.imgur.com/m2DKhA8.png) ](https://i.imgur.com/3gHkF0t.png)
**3.** At 'Start a Program', write `powershell -file -ExecutionPolicy ByPass -WindowStyle Hidden "C:\path\to\filename.ps1"` in the Program/script text box
3. At 'Start a Program', write `powershell -file -ExecutionPolicy ByPass -WindowStyle Hidden "C:\path\to\filename.ps1"` in the Program/script text box
![](https://i.imgur.com/FGtWRod.png)
**4.** Click 'Yes'
4. Click 'Yes'
![](https://i.imgur.com/DuaRBt3.png)
**5.** Click 'Finish'
5. Click 'Finish'
![](https://i.imgur.com/LHgXp9Q.png)
#
---
Special thanks to [@Yudi](https://github.com/Yudi)

@ -1,20 +1,20 @@
# Obtaining Token and Channel IDs
> **Warning**:
> **DO NOT SHARE YOUR TOKEN!**.
> **Do not share your token!**
> A token gives full access to an account. To reset a user token, change your account password. To reset a bot token, click on "[Regenerate](#how-to-get-a-bot-token)"
### How to get a User Token
## How to get a User Token
**Caution:** [Automating user accounts violates Discord's terms of service](https://support.discord.com/hc/en-us/articles/115002192352-Automated-user-accounts-self-bots-) and may result in account termination. Use at your own risk.
#### Through your web browser
### Through your web browser
Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
##### In Chrome
#### In Chrome
###### Using the network monitor
##### Using the network monitor
1. <img width="500" align="right" src="https://i.imgur.com/zdDwIT5.jpg" />Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> (<kbd></kbd>+<kbd></kbd>+<kbd>I</kbd> on macOS). Chrome's [DevTools](https://developer.chrome.com/docs/devtools/overview) tools will display.
@ -51,7 +51,7 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
<br clear="right" />
<br />
###### Using the storage inspector
##### Using the storage inspector
1. <img width="500" align="right" src="https://i.imgur.com/zdDwIT5.jpg" />Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> (<kbd></kbd>+<kbd></kbd>+<kbd>I</kbd> on macOS). Chrome's [DevTools](https://developer.chrome.com/docs/devtools/overview/) will display.
@ -88,9 +88,9 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
<br clear="right" />
<br />
##### In Firefox
#### In Firefox
###### Using the network monitor
##### Using the network monitor
1. <img width="500" align="right" src="https://i.imgur.com/O34nwdG.png" />Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>E</kbd> (<kbd></kbd>+<kbd></kbd>+<kbd>E</kbd> on macOS). Firefoxs [web developer tools](https://firefox-source-docs.mozilla.org/devtools-user/) will display at the bottom of the window, and the [network monitor](https://firefox-source-docs.mozilla.org/devtools-user/network_monitor/) will display.
@ -127,7 +127,7 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
<br clear="right" />
<br />
###### Using the storage inspector
##### Using the storage inspector
1. <img width="500" align="right" src="https://i.imgur.com/A8jqpkm.png" />Press <kbd>Shift</kbd>+<kbd>F9</kbd>. Firefoxs [web developer tools](https://firefox-source-docs.mozilla.org/devtools-user/) will display at the bottom of the window, and the [storage](https://firefox-source-docs.mozilla.org/devtools-user/storage_inspector/index.html) panel will be selected.
@ -164,9 +164,9 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
<br clear="right" />
<br />
#### Through the desktop app / Enabling web developer tools
### Through the desktop app / Enabling web developer tools
##### By editing the settings file
#### By editing the settings file
1. If Discord is running, exit the application by right-clicking the icon in your taskbar tray and clicking `Quit Discord`.
@ -200,7 +200,7 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
5. To find your user token, continue [here](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md#in-chrome).
##### Via settings menu (BetterDiscord only)
#### Via settings menu (BetterDiscord only)
1. <img width="500" align="right" src="https://i.imgur.com/mu1g4OF.png" />Click the User Settings button (the gear icon to the right of your username). Discords settings page will open.
@ -218,44 +218,45 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
<br />
4. Press <kbd>Esc</kbd>. The settings page will close.
5. To find your user token, continue [here](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md#in-chrome).
### How to get a Bot Token
## How to get a Bot Token
**1.** Go to [Discord developer portal](https://discord.com/developers/applications)
**2.** Open your Application's settings
**3.** Navigate to the **Bot** section on the left
**4.** Under **Token** click **Copy**
1. Go to [Discord developer portal](https://discord.com/developers/applications)
2. Open your Application's settings
3. Navigate to the **Bot** section on the left
4. Under **Token** click **Copy**
**Important**: your bot needs to have **Message Content Intent** enabled for it to be able to read messages!
> **Warning**:
> Your bot needs to have **Message Content Intent** enabled for it to be able to read messages!
![https://discord.com/developers/applications/](https://i.imgur.com/BdrrxlY.png)
---
### How to get a Server ID or a Server Channel ID
## How to get a Server ID or a Server Channel ID
**1.** Open Discord Settings
**2.** Go to the **Advanced** section
**3.** Enable **Developer Mode**
**4.** Right click on the desired server or channel and click Copy ID
1. Open Discord Settings
2. Go to the **Advanced** section
3. Enable **Developer Mode**
4. Right-click on the desired server or channel and click Copy ID
### How to get a Direct Message Channel ID
## How to get a Direct Message Channel ID
**1.** Click the three dots next to any message in the channel you want to export.
**2.** Paste the link into a text editor.
**3.** Copy the text in the highlighted part of the link.
1. Click the three dots next to any message in the channel you want to export.
2. Paste the link into a text editor.
3. Copy the text in the highlighted part of the link.
> E.g. in https//discord.com/channels/@me/**189716987098470**/0985709387059874, you should copy **189716987098470**
Make sure you're not copying the user's ID.
**Alternatively, you can also:**
**1.** Open the desired direct message channel
**2.** Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> (<kbd></kbd>+<kbd></kbd>+<kbd>I</kbd> on macOS) on Discord to show developer tools
**3.** Navigate to the `Console` tab
**4.** Type `window.location.href` and press Enter
**5.** Copy the first long sequence of numbers inside the URL
1. Open the desired direct message channel
2. Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> (<kbd></kbd>+<kbd></kbd>+<kbd>I</kbd> on macOS) on Discord to show developer tools
3. Navigate to the `Console` tab
4. Type `window.location.href` and press Enter
5. Copy the first long sequence of numbers inside the URL
> E.g. in https//discord.com/channels/@me/**84289740160**, you should copy **84289740160**

@ -7,7 +7,7 @@ Here you'll find the answers to most of the questions related to **DiscordChatEx
🐞 If you have encountered a problem that's not described here, has not [been discussed before](https://github.com/Tyrrrz/DiscordChatExporter/discussions), and is not a [known issue](https://github.com/Tyrrrz/DiscordChatExporter/issues?q=is%3Aissue), please [create a new discussion](https://github.com/Tyrrrz/DiscordChatExporter/discussions/new) or [open a bug report](https://github.com/Tyrrrz/DiscordChatExporter/issues/new).
Don't forget to include your platform (Windows, Mac, Linux, etc.) and a detailed description of your question/problem.
# General
## General
### Token stealer?
@ -55,7 +55,7 @@ No, DCE is an exporter.
No, DCE is an exporter.
# First steps
## First steps
### How can I find my token?
@ -99,7 +99,7 @@ If you already have .NET Core installed, please check if your problem is a [know
Check the following page: [Installing .NET Core Runtime](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Dotnet.md)
# CLI
## CLI
### How do I use the CLI?
@ -125,7 +125,7 @@ Check the following page:
Make sure you're [copying the DM Channel ID](https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md#how-to-get-a-direct-message-channel-id), not the person's user ID.
### Errors
## Errors
```
DiscordChatExporter.Domain.Exceptions.DiscordChatExporterException: Authentication token is invalid.
@ -167,5 +167,8 @@ If it still doesn't work, try mozroots: `mozroots --import --ask-remove`
---
❓ If you still have unanswered questions, feel free to [create a new discussion](https://github.com/Tyrrrz/DiscordChatExporter/discussions/new).
🐞 If you have encountered a problem that's not described here, has not [been discussed before](https://github.com/Tyrrrz/DiscordChatExporter/discussions), and is not a [known issue](https://github.com/Tyrrrz/DiscordChatExporter/issues?q=is%3Aissue), please [create a new discussion](https://github.com/Tyrrrz/DiscordChatExporter/discussions/new) or [open a bug report](https://github.com/Tyrrrz/DiscordChatExporter/issues/new).
> **Note**:
> ❓ If you still have unanswered questions, feel free to [create a new discussion](https://github.com/Tyrrrz/DiscordChatExporter/discussions/new).
> **Note**:
> 🐞 If you have encountered a problem that's not described here, has not [been discussed before](https://github.com/Tyrrrz/DiscordChatExporter/discussions), and is not a [known issue](https://github.com/Tyrrrz/DiscordChatExporter/issues?q=is%3Aissue), please [create a new discussion](https://github.com/Tyrrrz/DiscordChatExporter/discussions/new) or [open a bug report](https://github.com/Tyrrrz/DiscordChatExporter/issues/new).

Loading…
Cancel
Save