-The Plain Text format is the best option for archiving due to its small size.
+The Plain Text format formats messages as plain text, and has the smallest size.
You can open `.txt` files with a text editor, such as Notepad.
### JSON
diff --git a/.docs/Linux.md b/.docs/Linux.md
deleted file mode 100644
index 7a37ff72..00000000
--- a/.docs/Linux.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Linux usage instructions
-
-## Installing .NET Runtime
-
-Please follow the [instructions provided here](Dotnet.md).
-
-## Downloading and using DiscordChatExporter.Cli
-
-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:
-
-```console
-dotnet DiscordChatExporter.Cli.dll export -t TOKEN -c CHANNEL
-```
-
-If the above command throws a "Permission denied" error, execute this command to fix the permissions:
-
-```console
-chmod 644 *.dll DiscordChatExporter.*
-```
-
-> [How to get Token and Channel IDs](Token-and-IDs.md).
-
-There's much more you can do with DCE.CLI! Read the [CLI explained](Using-the-CLI.md) page to get started.
diff --git a/.docs/MacOS.md b/.docs/MacOS.md
deleted file mode 100644
index 8b949e4c..00000000
--- a/.docs/MacOS.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# macOS usage instructions
-
-
-
-## Installing .NET Runtime
-
-Please follow the [instructions provided here](Dotnet.md).
-
-## Downloading and using DiscordChatExporter.Cli
-
-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:
-
-```console
-dotnet DiscordChatExporter.Cli.dll export -t TOKEN -c CHANNEL
-```
-
-> [How to get Token and Channel IDs](Token-and-IDs.md).
-
-There's much more you can do with DCE.CLI! Read the [CLI explained](Using-the-CLI.md) page to get started.
diff --git a/.docs/Message-filters.md b/.docs/Message-filters.md
index 4d917d3d..c228aa70 100644
--- a/.docs/Message-filters.md
+++ b/.docs/Message-filters.md
@@ -89,17 +89,17 @@ from:96\-LB
In most cases, you will need to enclose your filter in quotes (`"`) to escape characters that may have special meaning in your shell:
```console
-DiscordChatExporter.Cli export [...] --filter "from:Tyrrrz has:image"
+$ ./DiscordChatExporter.Cli export [...] --filter "from:Tyrrrz has:image"
```
If you need to include quotes inside the filter itself as well, use single quotes (`'`) for those instead:
```console
-DiscordChatExporter.Cli export [...] --filter "from:Tyrrrz 'hello world'"
+$ ./DiscordChatExporter.Cli export [...] --filter "from:Tyrrrz 'hello world'"
```
Additionally, negated filters (those that start with `-`) may cause parsing issues even when enclosed in quotes. To avoid this, use the tilde (`~`) character instead of the dash (`-`):
```console
-DiscordChatExporter.Cli export [...] --filter ~from:Tyrrrz
+$ ./DiscordChatExporter.Cli export [...] --filter ~from:Tyrrrz
```
diff --git a/.docs/Readme.md b/.docs/Readme.md
index b050817c..01f86e51 100644
--- a/.docs/Readme.md
+++ b/.docs/Readme.md
@@ -2,8 +2,6 @@
## Installation & Usage
-- [Get .NET Core Runtime](Dotnet.md) (Required for CLI; Installed automatically for GUI; Not required in Docker)
-- [Windows](Getting-started.md#gui-or-cli) | [macOS](MacOS.md) | [Linux](Linux.md) | [Docker](Docker.md)
- Getting started:
- [Using the GUI](Using-the-GUI.md)
- [Using the CLI](Using-the-CLI.md)
@@ -29,6 +27,5 @@
- [General questions](Troubleshooting.md#general)
- [First steps help](Troubleshooting.md#first-steps)
- [It's crashing/failing](Troubleshooting.md#DCE-is-crashingfailing)
-- [.NET Core Runtime is required](Troubleshooting.md#net-core-runtime-is-required)
- [Errors](Troubleshooting.md#errors)
- [**More help**](Troubleshooting.md)
diff --git a/.docs/Scheduling-Linux.md b/.docs/Scheduling-Linux.md
index 63a5bfc1..7534d2e6 100644
--- a/.docs/Scheduling-Linux.md
+++ b/.docs/Scheduling-Linux.md
@@ -1,7 +1,5 @@
# Scheduling exports with Cron
-Make sure you already have **DiscordChatExporter.CLI** and **.NET Core** properly installed ([instructions here](Linux.md)).
-
## Creating the script
1. Open Terminal and create a new text file with `nano /path/to/DiscordChatExporter/cron.sh`
@@ -13,7 +11,7 @@ Make sure you already have **DiscordChatExporter.CLI** and **.NET Core** properl
```bash
#!/bin/bash
-# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs
+# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs
TOKEN=tokenhere
CHANNELID=channelhere
@@ -45,7 +43,7 @@ fi
cd $DLLFOLDER || exit 1
# This will export your chat
-dotnet DiscordChatExporter.Cli.dll export -t $TOKEN -c $CHANNELID -f $EXPORTFORMAT -o $FILENAME.tmp
+./DiscordChatExporter.Cli export -t $TOKEN -c $CHANNELID -f $EXPORTFORMAT -o $FILENAME.tmp
# This sets the current time to a variable
CURRENTTIME=$(date +"%Y-%m-%d-%H-%M-%S")
diff --git a/.docs/Scheduling-MacOS.md b/.docs/Scheduling-MacOS.md
index f2a9a360..78e362a9 100644
--- a/.docs/Scheduling-MacOS.md
+++ b/.docs/Scheduling-MacOS.md
@@ -1,9 +1,5 @@
# Scheduling exports on macOS
-Scheduling on macOS is a bit tricky, but it should work if you follow the instructions accordingly.
-
-Make sure you already have **DiscordChatExporter.CLI** and **.NET Core** properly installed ([instructions here](MacOS.md)).
-
## Creating the script
1. Open TextEdit.app and create a new file
@@ -16,7 +12,7 @@ Make sure you already have **DiscordChatExporter.CLI** and **.NET Core** properl
```bash
#!/bin/bash
-# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs
+# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs
TOKEN=tokenhere
CHANNELID=channelhere
@@ -51,7 +47,7 @@ fi
cd $DLLFOLDER || exit 1
# This will export your chat
-dotnet DiscordChatExporter.Cli.dll export -t $TOKEN -c $CHANNELID -f $EXPORTFORMAT -o $FILENAME.tmp
+./DiscordChatExporter.Cli export -t $TOKEN -c $CHANNELID -f $EXPORTFORMAT -o $FILENAME.tmp
# This sets the current time to a variable
CURRENTTIME=$(date +"%Y-%m-%d-%H-%M-%S")
diff --git a/.docs/Scheduling-Windows.md b/.docs/Scheduling-Windows.md
index 9cfed26a..f8729c3d 100644
--- a/.docs/Scheduling-Windows.md
+++ b/.docs/Scheduling-Windows.md
@@ -1,13 +1,11 @@
# Scheduling exports on Windows
-We'll be using [DiscordChatExporter CLI](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest), PowerShell, and Task Scheduler.
-
## Creating the script
1. Open a text editor such as Notepad and paste:
```console
-# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs
+# Info: https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs
$TOKEN = "tokenhere"
$CHANNEL = "channelhere"
@@ -19,7 +17,7 @@ $EXPORTFORMAT = "formathere"
cd $EXEPATH
-.\DiscordChatExporter.Cli.exe export -t $TOKEN -c $CHANNEL -f $EXPORTFORMAT -o "$FILENAME.tmp"
+./DiscordChatExporter.Cli export -t $TOKEN -c $CHANNEL -f $EXPORTFORMAT -o "$FILENAME.tmp"
$Date = Get-Date -Format "yyyy-MM-dd-HH-mm"
diff --git a/.docs/Token-and-IDs.md b/.docs/Token-and-IDs.md
index 7dbdf15d..eae162ce 100644
--- a/.docs/Token-and-IDs.md
+++ b/.docs/Token-and-IDs.md
@@ -1,10 +1,11 @@
# Obtaining Token and Channel IDs
-> **Warning**:
-> **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) in the bot settings.
+> [!WARNING]
+> **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 [Reset Token](#how-to-export-with-a-bot-token) in the bot settings.
-## 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.
@@ -25,8 +26,8 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
3. Type
- ```console
- (webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken()
+ ```js
+ let m;webpackChunkdiscord_app.push([[Math.random()],{},e=>{for(let i in e.c){let x=e.c[i];if(x?.exports?.getToken){m=x;break}}}]);m&&console.log("Token:",m.exports.getToken());
```
into the console and press Enter. The console will display your user token.
@@ -118,8 +119,8 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
1. Type
- ```console
- (webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken()
+ ```js
+ let m;webpackChunkdiscord_app.push([[Math.random()],{},e=>{for(let i in e.c){let x=e.c[i];if(x?.exports?.getToken){m=x;break}}}]);m&&console.log("Token:",m.exports.getToken());
```
into the console and press Enter. The console will display your user token.
@@ -254,17 +255,61 @@ Prerequisite step: Navigate to [discord.com](https://discord.com) and login.
4. Press Esc. The settings page will close.
5. To find your user token, continue [here](#in-chrome).
-## How to get a Bot Token
+## How to export with a bot token
+
+### Step 1 - Create an application
+
+You can create a new application or use an existing one. If you want to create a new one:
+
+1. Go to [Discord developer portal](https://discord.com/developers/applications)
+2. Click on **New Application** in the top right corner
+3. Enter a name for your application and click **Create**
+
+### Step 2 - Invite the bot to your server
+
+The bot needs to be invited to the server you'd like to export from.
+
+1. Go to [Discord developer portal](https://discord.com/developers/applications)
+2. Navigate to **General Information** on the left
+3. Copy the **Application ID**
+4. Open the following URL in your browser, replacing `YOUR_APP_ID` with the copied Client ID:
+
+
+
+```
+https://discord.com/oauth2/authorize?scope=bot&permissions=66560&client_id=YOUR_APP_ID
+```
+
+### Step 3 - Ensure message content intent is enabled
+
+If this option is not enabled, the exported files will be empty.
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**
+4. Scroll down to the **Privileged Gateway Intents** section
+5. Enable **Message Content Intent** by toggling the switch
-> **Warning**:
-> Your bot needs to have **Message Content Intent** enabled for it to be able to read messages!
+
-
+### Step 4 - Copy the bot token
+
+If you don't have a bot token yet or if you've lost it, follow these steps to reset it:
+
+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 **Reset Token**
+5. Click **Yes, do it!** and authenticate to confirm
+
+> **Tip**:
+> As the token is only shown once, make sure to store it in a safe place. If you lose the token, you will have to reset it again.
+
+> [!WARNING]
+> Resetting the token will invalidate the old one. Any integrations relying on the old token will cease to function until they are updated.
+
+
---
diff --git a/.docs/Troubleshooting.md b/.docs/Troubleshooting.md
index 7ff700b2..024a8dbb 100644
--- a/.docs/Troubleshooting.md
+++ b/.docs/Troubleshooting.md
@@ -24,7 +24,7 @@ Follow the [instructions here](Token-and-IDs.md).
### Will I get banned if I use this?
-Automating user accounts is technically against [TOS](https://discord.com/terms), use at your discretion. [Bot accounts](https://discord.com/developers/docs/topics/oauth2#bots) don't have this restriction.
+Automating user accounts is technically against [TOS](https://discord.com/terms), use at your discretion. [Bot accounts](https://discord.com/developers/docs/topics/oauth2#bot-users) don't have this restriction.
### Will the messages disappear from the exported file if I delete a message, delete my account or block a person?
@@ -70,14 +70,7 @@ Check the following page: [Obtaining token](Token-and-IDs.md)
### When I open DCE a black window pops up quickly or nothing shows up
-If you have [.NET Core Runtime correctly installed](Dotnet.md), you might have downloaded the CLi flavor, try [downloading the GUI](Getting-started.md#gui-or-cli) instead.
-
-### How do I run DCE on macOS or Linux?
-
-Check the following pages:
-
-- [macOS usage instructions](MacOS.md)
-- [Linux usage instructions](Linux.md)
+You might have downloaded the CLI flavor of the app, which is meant to be run in a terminal. Try [downloading the GUI](Getting-started.md#gui-or-cli) instead if that's what you want.
### How can I set DCE to export automatically at certain times?
@@ -91,16 +84,6 @@ Check the following pages to learn how to schedule **DiscordChatExporter.CLI** r
Try opening it with a different program, try partitioning or use a different file format, like `PlainText`.
-### DCE is crashing/failing
-
-Check the following page: [Installing .NET Core Runtime](Dotnet.md)
-
-If you already have .NET Core installed, please check if your problem is a [known issue](https://github.com/Tyrrrz/DiscordChatExporter/issues?q=is%3Aissue) before [opening a bug report](https://github.com/Tyrrrz/DiscordChatExporter/issues/new).
-
-### .NET Core Runtime is required
-
-Check the following page: [Installing .NET Core Runtime](Dotnet.md)
-
### I see messages in the export, but they have no content
Your bot is missing the 'Message Content Intent'. Go to the [Discord Developer Portal](https://discord.com/developers/applications), navigate to the 'Bot' section and enable it.
@@ -133,34 +116,26 @@ Make sure you're [copying the DM Channel ID](Token-and-IDs.md#how-to-get-a-direc
## Errors
-```console
+```yml
DiscordChatExporter.Domain.Exceptions.DiscordChatExporterException: Authentication token is invalid.
-...
```
↳ Make sure the provided token is correct.
-```console
+```yml
DiscordChatExporter.Domain.Exceptions.DiscordChatExporterException: Requested resource does not exist.
```
↳ Check your channel ID, it might be invalid. [Read this if you need help](Token-and-IDs.md).
-```console
+```yml
DiscordChatExporter.Domain.Exceptions.DiscordChatExporterException: Access is forbidden.
```
↳ This means you don't have access to the channel.
-```console
-The application to execute does not exist:
-```
-
-↳ The `DiscordChatExporter.Cli.dll` file is missing. Keep the `.exe` and all the `.dll` files together. If you didn't move the files, try unzipping again.
-
-```console
+```yml
System.Net.WebException: Error: TrustFailure ... Invalid certificate received from server.
-...
```
↳ Try running cert-sync.
@@ -171,6 +146,12 @@ Red Hat: `cert-sync --user /etc/pki/tls/certs/ca-bundle.crt`
If it still doesn't work, try mozroots: `mozroots --import --ask-remove`
+## macOS-specific
+
+### DiscordChatExporter is damaged and can’t be opened. You should move it to the Trash.
+
+Check the [Using the GUI page](Using-the-GUI.md#step-1) for instructions on how to run the app.
+
---
> ❓ If you still have unanswered questions, feel free to [create a new discussion](https://github.com/Tyrrrz/DiscordChatExporter/discussions/new).
diff --git a/.docs/Using-the-CLI.md b/.docs/Using-the-CLI.md
index b52d2449..36de6c95 100644
--- a/.docs/Using-the-CLI.md
+++ b/.docs/Using-the-CLI.md
@@ -1,66 +1,61 @@
# Using the CLI
-## Guide
-
-> **Note**:
-> Make sure you have [.NET Core installed](Dotnet.md) before attempting to run the commands below.
-> **Docker** users, please refer to the [Docker usage instructions](Docker.md).
-
## Step 1
-After extracting the `.zip`, open Command Prompt, aka `cmd` (`Terminal` on **macOS** and **Linux**).
+After extracting the `.zip` archive, open your preferred terminal.
## Step 2
-Change the current directory to DCE's folder with `cd C:\path\to\directory`, then press ENTER to run the command.
+Change the current directory to DCE's folder with `cd C:\path\to\DiscordChatExporter` (`cd /path/to/DiscordChatExporter` on **MacOS** and **Linux**), 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.
+**Windows** users can quickly get the folder's path by clicking the address bar while inside the folder.

-**macOS** users can select the `.exe`, hit Command+I (⌘I), and copy what's after `Where:` to get the directory
-
+**macOS** users can press Command+Option+C (⌘⌥C) while inside the folder (or selecting it) to copy its path to the clipboard.
You can also drag and drop the folder on **every platform**.

## Step 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.
+Now we're ready to run the commands.
-Type the following in Command Prompt (Terminal), then press ENTER to run it. This will list DCE's options.
+Type the following command in your terminal of choice, then press ENTER to run it. This will list all available subcommands and options.
```console
-dotnet DiscordChatExporter.Cli.dll
+./DiscordChatExporter.Cli
```
+> **Note**:
+> On Windows, if you're using the default Command Prompt (`cmd`), omit the leading `./` at the start of the command.
+
> **Docker** users, please refer to the [Docker usage instructions](Docker.md).
## CLI commands
-| Command | Description |
-|-------------------------|------------------------------------------------------|
-| export | Exports a channel |
-| exportdm | Exports all direct message channels |
-| exportguild | Exports all channels within the specified server |
-| exportall | Exports all accessible channels |
-| channels | Outputs the list of channels in the given server |
-| dm | Outputs the list of direct message channels |
-| guilds | Outputs the list of accessible servers |
-| guide | Explains how to obtain token, server, and channel ID |
+| Command | Description |
+| ----------- | ---------------------------------------------------- |
+| export | Exports a channel |
+| exportdm | Exports all direct message channels |
+| exportguild | Exports all channels within the specified server |
+| exportall | Exports all accessible channels |
+| channels | Outputs the list of channels in the given server |
+| dm | Outputs the list of direct message channels |
+| guilds | Outputs the list of accessible servers |
+| guide | Explains how to obtain token, server, and channel ID |
-To use the commands, you'll need a token. For the instructions on how to get a token, please refer to [this page](Token-and-IDs.md), or run `dotnet DiscordChatExporter.Cli.dll guide`.
+To use the commands, you'll need a token. For the instructions on how to get a token, please refer to [this page](Token-and-IDs.md), or run `./DiscordChatExporter.Cli guide`.
To get help with a specific command, run:
```console
-dotnet DiscordChatExporter.Cli.dll command --help
+./DiscordChatExporter.Cli command --help
```
For example, to figure out how to use the `export` command, run:
```console
-dotnet DiscordChatExporter.Cli.dll export --help
+./DiscordChatExporter.Cli export --help
```
## Export a specific channel
@@ -68,7 +63,7 @@ dotnet DiscordChatExporter.Cli.dll export --help
You can quickly export with DCE's default settings by using just `-t token` and `-c channelid`.
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555
```
#### Changing the format
@@ -77,7 +72,7 @@ You can change the export format to `HtmlDark`, `HtmlLight`, `PlainText` `Json`
format is `HtmlDark`.
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -f Json
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 -f Json
```
#### Changing the output filename
@@ -85,7 +80,7 @@ dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -f Json
You can change the filename by using `-o name.ext`. e.g. for the `HTML` format:
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -o myserver.html
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 -o myserver.html
```
#### Changing the output directory
@@ -95,7 +90,7 @@ extension.
If any of the folders in the path have a space in its name, escape them with quotes (").
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports"
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports"
```
#### Changing the filename and output directory
@@ -105,7 +100,7 @@ Note that the filename must have an extension, otherwise it will be considered a
If any of the folders in the path have a space in its name, escape them with quotes (").
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports\myserver.html"
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports\myserver.html"
```
#### Generating the filename and output directory dynamically
@@ -113,7 +108,7 @@ dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -o "C:\Discord
You can use template tokens to generate the output file path based on the server and channel metadata.
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports\%G\%T\%C.html"
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 -o "C:\Discord Exports\%G\%T\%C.html"
```
Assuming you are exporting a channel named `"my-channel"` in the `"Text channels"` category from a server
@@ -132,6 +127,7 @@ Here is the full list of supported template tokens:
- `%P` - category position
- `%a` - the "after" date
- `%b` - the "before" date
+- `%d` - the current date
- `%%` - escapes `%`
#### Partitioning
@@ -140,13 +136,13 @@ You can use partitioning to split files after a given number of messages or file
For example, a channel with 36 messages set to be partitioned every 10 messages will output 4 files.
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -p 10
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 -p 10
```
A 45 MB channel set to be partitioned every 20 MB will output 3 files.
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 -p 20mb
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 -p 20mb
```
#### Downloading assets
@@ -157,7 +153,7 @@ 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.
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 --media
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 --media
```
#### Reusing assets
@@ -166,7 +162,7 @@ Previously downloaded assets can be reused to skip redundant downloads as long a
same folder. Using this option can speed up future exports. This option requires the `--media` option.
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 --media --reuse-media
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 --media --reuse-media
```
#### Changing the media directory
@@ -175,7 +171,7 @@ By default, the media directory is created alongside the exported chat. You can
providing a path that ends with a slash. All of the exported media will be stored in this directory.
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 --media --media-dir "C:\Discord Media"
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 --media --media-dir "C:\Discord Media"
```
#### Changing the date format
@@ -184,7 +180,7 @@ You can customize how dates are formatted in the exported files by using `--loca
locales. The default locale is `en-US`.
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 --locale "de-DE"
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 --locale "de-DE"
```
#### Date ranges
@@ -193,14 +189,14 @@ dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 --locale "de-DE
Use `--before` to export messages sent before the provided date. E.g. messages sent before September 18th, 2019:
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 --before 2019-09-18
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 --before 2019-09-18
```
**Messages sent after a date**
Use `--after` to export messages sent after the provided date. E.g. messages sent after September 17th, 2019 11:34 PM:
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 --after "2019-09-17 23:34"
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 --after "2019-09-17 23:34"
```
**Messages sent in a date range**
@@ -208,7 +204,7 @@ Use `--before` and `--after` to export messages sent during the provided date ra
September 17th, 2019 11:34 PM and September 18th:
```console
-dotnet DiscordChatExporter.Cli.dll export -t "mfa.Ifrn" -c 53555 --after "2019-09-17 23:34" --before "2019-09-18"
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 --after "2019-09-17 23:34" --before "2019-09-18"
```
You can try different formats like `17-SEP-2019 11:34 PM` or even refine your ranges down to
@@ -217,12 +213,22 @@ 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).
+#### Filtering messages
+
+Use `--filter` to filter what messages are included in the export.
+
+```console
+./DiscordChatExporter.Cli export -t "mfa.Ifrn" -c 53555 --filter "from:Tyrrrz has:image"
+```
+
+Documentation on message filter syntax can be found [here](https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs/Message-filters.md).
+
### Export channels from a specific server
To export all channels in a specific server, use the `exportguild` command and provide the server ID through the `-g|--guild` option:
```console
-dotnet DiscordChatExporter.Cli.dll exportguild -t "mfa.Ifrn" -g 21814
+./DiscordChatExporter.Cli exportguild -t "mfa.Ifrn" -g 21814
```
#### Including threads
@@ -232,7 +238,7 @@ specifying which threads should be included. It has possible values of `none`, `
threads should be included. To include both active and archived threads, use `--include-threads all`.
```console
-dotnet DiscordChatExporter.Cli.dll exportguild -t "mfa.Ifrn" -g 21814 --include-threads all
+./DiscordChatExporter.Cli exportguild -t "mfa.Ifrn" -g 21814 --include-threads all
```
#### Including voice channels
@@ -242,7 +248,7 @@ specifying whether to include voice channels in the export. It has possible valu
voice channels, use `--include-vc false`.
```console
-dotnet DiscordChatExporter.Cli.dll exportguild -t "mfa.Ifrn" -g 21814 --include-vc false
+./DiscordChatExporter.Cli exportguild -t "mfa.Ifrn" -g 21814 --include-vc false
```
### Export all channels
@@ -250,7 +256,7 @@ dotnet DiscordChatExporter.Cli.dll exportguild -t "mfa.Ifrn" -g 21814 --include-
To export all accessible channels, use the `exportall` command:
```console
-dotnet DiscordChatExporter.Cli.dll exportall -t "mfa.Ifrn"
+./DiscordChatExporter.Cli exportall -t "mfa.Ifrn"
```
#### Excluding DMs
@@ -258,7 +264,7 @@ dotnet DiscordChatExporter.Cli.dll exportall -t "mfa.Ifrn"
To exclude DMs, add the `--include-dm false` option.
```console
-dotnet DiscordChatExporter.Cli.dll exportall -t "mfa.Ifrn" --include-dm false
+./DiscordChatExporter.Cli exportall -t "mfa.Ifrn" --include-dm false
```
### List channels in a server
@@ -266,7 +272,7 @@ dotnet DiscordChatExporter.Cli.dll exportall -t "mfa.Ifrn" --include-dm false
To list the channels available in a specific server, use the `channels` command and provide the server ID through the `-g|--guild` option:
```console
-dotnet DiscordChatExporter.Cli.dll channels -t "mfa.Ifrn" -g 21814
+./DiscordChatExporter.Cli channels -t "mfa.Ifrn" -g 21814
```
### List direct message channels
@@ -274,7 +280,7 @@ dotnet DiscordChatExporter.Cli.dll channels -t "mfa.Ifrn" -g 21814
To list all DM channels accessible to the current account, use the `dm` command:
```console
-dotnet DiscordChatExporter.Cli.dll dm -t "mfa.Ifrn"
+./DiscordChatExporter.Cli dm -t "mfa.Ifrn"
```
### List servers
@@ -282,5 +288,5 @@ dotnet DiscordChatExporter.Cli.dll dm -t "mfa.Ifrn"
To list all servers accessible by the current account, use the `guilds` command:
```console
-dotnet DiscordChatExporter.Cli.dll guilds -t "mfa.Ifrn" > C:\path\to\output.txt
-```
\ No newline at end of file
+./DiscordChatExporter.Cli guilds -t "mfa.Ifrn" > C:\path\to\output.txt
+```
diff --git a/.docs/Using-the-GUI.md b/.docs/Using-the-GUI.md
index 07e073f6..a206b2fe 100644
--- a/.docs/Using-the-GUI.md
+++ b/.docs/Using-the-GUI.md
@@ -10,13 +10,28 @@
### Step 1
-After extracting the `.zip`, open `DiscordChatExporter.exe`
+After extracting the `.zip`, run `DiscordChatExporter.exe` **(Windows)**, or `DiscordChatExporter` **(Linux)**.
+
+If you're using **macOS**, you'll need to manually grant permission for the app to run.
+If you skip these steps, the "DiscordChatExporter is damaged and can’t be opened" error will be shown.
+
+1. Open Terminal.app. You can search for it in Spotlight (press ⌘ + Space and type "Terminal").
+2. Paste the following into the terminal window:
+ ```bash
+ xattr -rd com.apple.quarantine
+ ```
+3. Hit Space once to add a space after the command
+4. Drag and drop DiscordChatExporter.app into the terminal window
+5. Press Return to run the command
+6. Open DiscordChatExporter.app normally
+
+> Apple requires apps to be notarized and signed in order to run on macOS without warnings, which in turn requires an Apple Developer membership ($99/year). This open-source project is distributed for free and without commercial intent.
### Step 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 (→).
-> **Warning**:
+> [!WARNING]
> **Never share your token!**
> A token gives full access to an account, treat it like a password.
@@ -61,37 +76,30 @@ In this screen you can customize the following:
## Settings
-- **Auto-update**
-Perform automatic updates on every launch.
+- **Auto-update** - Perform automatic updates on every launch.
Default: Enabled
> **Note**:
> Keep this option enabled to receive the latest features and bug fixes!
-- **Dark mode**
-Use darker colors in the UI (User Interface).
+- **Dark mode** - Use darker colors in the UI (User Interface).
Default: Disabled
-- **Persist token**
-Persist last used token between sessions.
+- **Persist token** - Persist last used token between sessions.
Default: Enabled
-- **Show threads**
-Controls whether threads are shown in the channel list.
+- **Show threads** - Controls whether threads are shown in the channel list.
Default: none
-- **Locale**
-Customize how dates are formatted in the exported files.
+- **Locale** - Customize how dates are formatted in the exported files.
-- **Date format**
-Customize how dates are formatted in the exported files in the settings menu ().
+- **Date format** - Customize how dates are formatted in the exported files in the settings menu ().
-- **Parallel limit**
-The number of channels that will be exported at the same time.
+- **Parallel limit** - The number of channels that will be exported at the same time.
Default: 1
-- **Normalize to UTC**
-Convert all dates to UTC before exporting.
-
> **Note**:
> Try to keep this number low so that your account doesn't get flagged.
+
+- **Normalize to UTC** - Convert all dates to UTC before exporting.
+
diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml
index 1ffcc397..fbc70a4a 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.yml
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -100,6 +100,8 @@ body:
required: true
- label: I have sponsored this project
required: false
+ - label: I have not read any of the above and just checked all the boxes to submit the issue
+ required: false
- type: markdown
attributes:
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 1c401ac5..0228eac6 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,10 +1,10 @@
blank_issues_enabled: false
contact_links:
- name: ⚠ Feature request
- url: https://github.com/Tyrrrz/.github/blob/master/docs/project-status.md
- about: Sorry, but this project is in maintenance mode and no longer accepts new feature requests.
+ url: https://github.com/Tyrrrz/.github/blob/prime/docs/project-status.md
+ about: Sorry, but this project is in maintenance mode and currently doesn't accept new feature requests.
- name: 📖 Documentation
- url: https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs
+ url: https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs
about: Find usage guides and frequently asked questions.
- name: 🗨 Discussions
url: https://github.com/Tyrrrz/DiscordChatExporter/discussions/new
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000..cdbf26b9
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,32 @@
+version: 2
+updates:
+ - package-ecosystem: github-actions
+ directory: "/"
+ schedule:
+ interval: monthly
+ labels:
+ - enhancement
+ groups:
+ actions:
+ patterns:
+ - "*"
+ - package-ecosystem: docker
+ directory: "/"
+ schedule:
+ interval: monthly
+ labels:
+ - enhancement
+ groups:
+ docker:
+ patterns:
+ - "*"
+ - package-ecosystem: nuget
+ directory: "/"
+ schedule:
+ interval: monthly
+ labels:
+ - enhancement
+ groups:
+ nuget:
+ patterns:
+ - "*"
diff --git a/.github/release.yml b/.github/release.yml
new file mode 100644
index 00000000..1df7efb4
--- /dev/null
+++ b/.github/release.yml
@@ -0,0 +1,18 @@
+changelog:
+ exclude:
+ authors:
+ - dependabot
+ - dependabot[bot]
+
+ categories:
+ - title: Enhancements
+ labels:
+ - enhancement
+
+ - title: Bugs
+ labels:
+ - bug
+
+ - title: Other
+ labels:
+ - "*"
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index c43b586a..ec56bde2 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -4,16 +4,15 @@ on:
workflow_dispatch:
push:
branches:
- - master
+ - prime
tags:
- "*"
pull_request:
branches:
- - master
+ - prime
jobs:
- # Outputs from this job aren't really used, but it's here to verify that
- # the Dockerfile builds correctly on pull requests.
+ # Outputs from this job aren't really used, but it's here to verify that the Dockerfile builds correctly
pack:
runs-on: ubuntu-latest
timeout-minutes: 10
@@ -24,10 +23,10 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # 4.1.0
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Docker Buildx
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # 3.0.0
+ uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Build image
run: >
@@ -37,16 +36,16 @@ jobs:
--build-arg VERSION=${{ github.ref_type == 'tag' && github.ref_name || format('999.9.9-ci-{0}', github.sha) }}
--output type=tar,dest=DiscordChatExporter.Cli.Docker.tar
- - name: Upload artifacts
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # 3.1.3
+ - name: Upload image
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: DiscordChatExporter.Cli.Docker
path: DiscordChatExporter.Cli.Docker.tar
if-no-files-found: error
deploy:
- # Deploy to DockerHub only on tag push or master branch push
- if: ${{ github.ref_type == 'tag' || github.ref_type == 'branch' && github.ref_name == 'master' }}
+ # Deploy to DockerHub only on tag push or prime branch push
+ if: ${{ github.ref_type == 'tag' || github.ref_type == 'branch' && github.ref_name == 'prime' }}
runs-on: ubuntu-latest
timeout-minutes: 10
@@ -56,10 +55,10 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # 4.1.0
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Docker Buildx
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # 3.0.0
+ uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Login to DockerHub
run: >
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 2d2df6bd..7e63cf6a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -4,12 +4,12 @@ on:
workflow_dispatch:
push:
branches:
- - master
+ - prime
tags:
- "*"
pull_request:
branches:
- - master
+ - prime
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
@@ -18,7 +18,7 @@ env:
jobs:
format:
- runs-on: windows-latest
+ runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
@@ -26,24 +26,35 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # 4.1.0
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install .NET
- uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # 3.2.0
- with:
- dotnet-version: 8.0.x
+ uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
+
+ # Build the project separately to discern between build and format errors
+ - name: Build
+ run: >
+ dotnet build
+ -p:CSharpier_Bypass=true
+ --configuration Release
- name: Verify formatting
+ id: verify
run: >
dotnet build
-t:CSharpierFormat
--configuration Release
+ --no-restore
+
+ - name: Report issues
+ if: ${{ failure() && steps.verify.outcome == 'failure' }}
+ run: echo "::error title=Bad formatting::Formatting issues detected. Please build the solution locally to fix them."
test:
# Tests need access to secrets, so we can't run them against PRs because of limited trust
if: ${{ github.event_name != 'pull_request' }}
- runs-on: windows-latest
+ runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
@@ -51,12 +62,10 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # 4.1.0
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install .NET
- uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # 3.2.0
- with:
- dotnet-version: 8.0.x
+ uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
- name: Run tests
env:
@@ -72,7 +81,7 @@ jobs:
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Upload coverage
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # 3.1.4
+ uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
@@ -82,8 +91,24 @@ jobs:
app:
- DiscordChatExporter.Cli
- DiscordChatExporter.Gui
+ rid:
+ - win-arm64
+ - win-x86
+ - win-x64
+ - linux-arm
+ - linux-arm64
+ - linux-musl-x64
+ - linux-x64
+ - osx-arm64
+ - osx-x64
+ include:
+ - app: DiscordChatExporter.Cli
+ asset: DiscordChatExporter.Cli
+ - app: DiscordChatExporter.Gui
+ # GUI assets aren't suffixed, unlike the CLI assets
+ asset: DiscordChatExporter
- runs-on: windows-latest
+ runs-on: ${{ startsWith(matrix.rid, 'win-') && 'windows-latest' || startsWith(matrix.rid, 'osx-') && 'macos-latest' || 'ubuntu-latest' }}
timeout-minutes: 10
permissions:
@@ -92,25 +117,27 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # 4.1.0
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install .NET
- uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # 3.2.0
- with:
- dotnet-version: 8.0.x
+ uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
- name: Publish app
run: >
dotnet publish ${{ matrix.app }}
-p:Version=${{ github.ref_type == 'tag' && github.ref_name || format('999.9.9-ci-{0}', github.sha) }}
-p:CSharpier_Bypass=true
+ -p:EncryptionSalt=${{ secrets.ENCRYPTION_SALT || 'HimalayanPinkSalt' }}
+ -p:PublishMacOSBundle=${{ startsWith(matrix.rid, 'osx-') }}
--output ${{ matrix.app }}/bin/publish/
--configuration Release
+ --runtime ${{ matrix.rid }}
+ --self-contained
- - name: Upload artifacts
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # 3.1.3
+ - name: Upload app binaries
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
- name: ${{ matrix.app }}
+ name: ${{ matrix.asset }}.${{ matrix.rid }}
path: ${{ matrix.app }}/bin/publish/
if-no-files-found: error
@@ -147,11 +174,21 @@ jobs:
app:
- DiscordChatExporter.Cli
- DiscordChatExporter.Gui
+ rid:
+ - win-arm64
+ - win-x86
+ - win-x64
+ - linux-arm
+ - linux-arm64
+ - linux-musl-x64
+ - linux-x64
+ - osx-arm64
+ - osx-x64
include:
- app: DiscordChatExporter.Cli
asset: DiscordChatExporter.Cli
- app: DiscordChatExporter.Gui
- # GUI asset isn't suffixed, unlike the CLI asset
+ # GUI assets aren't suffixed, unlike the CLI assets
asset: DiscordChatExporter
runs-on: ubuntu-latest
@@ -162,23 +199,31 @@ jobs:
contents: write
steps:
- - name: Download artifacts
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # 3.0.2
+ - name: Download app binaries
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
- name: ${{ matrix.app }}
+ name: ${{ matrix.asset }}.${{ matrix.rid }}
path: ${{ matrix.app }}/
+ - name: Set permissions
+ if: ${{ !startsWith(matrix.rid, 'win-') }}
+ run: |
+ [ -f ${{ matrix.app }}/${{ matrix.asset }} ] && chmod +x ${{ matrix.app }}/${{ matrix.asset }} || true
+
+ # macOS bundle
+ [ -f ${{ matrix.app }}/${{ matrix.asset }}.app/Contents/MacOS/${{ matrix.asset }} ] && chmod +x ${{ matrix.app }}/${{ matrix.asset }}.app/Contents/MacOS/${{ matrix.asset }} || true
+
- name: Create package
# Change into the artifacts directory to avoid including the directory itself in the zip archive
working-directory: ${{ matrix.app }}/
- run: zip -r ../${{ matrix.asset }}.zip .
+ run: zip -r ../${{ matrix.asset }}.${{ matrix.rid }}.zip .
- name: Upload release asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
gh release upload ${{ github.ref_name }}
- ${{ matrix.asset }}.zip
+ ${{ matrix.asset }}.${{ matrix.rid }}.zip
--repo ${{ github.event.repository.full_name }}
notify:
@@ -191,7 +236,7 @@ jobs:
steps:
- name: Notify Discord
- uses: tyrrrz/action-http-request@64c70c67f5ebc54d4c7ea09cbe3553322778afd5 # 1.1.2
+ uses: tyrrrz/action-http-request@110f1a0f0f7e91c3b2de349539249f4573c243fa # 1.1.5
with:
url: ${{ secrets.DISCORD_WEBHOOK }}
method: POST
diff --git a/Directory.Build.props b/Directory.Build.props
index ec60d3ca..188b0263 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,13 +1,12 @@