Update ListCommand error message and use dce alias throughout CLI docs

Agent-Logs-Url: https://github.com/Tyrrrz/DiscordChatExporter/sessions/b521468e-a2a4-4360-ab0c-847ef5e4d366

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-03 15:48:36 +00:00 committed by GitHub
parent 55c06ef40e
commit 5c86beb809
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 34 additions and 37 deletions

View file

@ -23,11 +23,11 @@ Now we're ready to run the commands.
Type the following command in your terminal of choice, then press ENTER to run it. This will list all available subcommands and 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 ```console
./DiscordChatExporter.Cli ./dce.sh
``` ```
> **Note**: > **Note**:
> On Windows, if you're using the default Command Prompt (`cmd`), omit the leading `./` at the start of the command. > On Windows, use `dce.bat` instead of `./dce.sh`.
> **Docker** users, please refer to the [Docker usage instructions](Docker.md). > **Docker** users, please refer to the [Docker usage instructions](Docker.md).
@ -41,18 +41,18 @@ Type the following command in your terminal of choice, then press ENTER to run i
| list guilds | Outputs the list of accessible servers | | list guilds | Outputs the list of accessible servers |
| guide | Explains how to obtain token, server, and channel ID | | 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 `./DiscordChatExporter.Cli 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 `./dce.sh guide`.
To get help with a specific command, run: To get help with a specific command, run:
```console ```console
./DiscordChatExporter.Cli command --help ./dce.sh command --help
``` ```
For example, to figure out how to use the `export` command, run: For example, to figure out how to use the `export` command, run:
```console ```console
./DiscordChatExporter.Cli export --help ./dce.sh export --help
``` ```
## Export a specific channel ## Export a specific channel
@ -60,7 +60,7 @@ For example, to figure out how to use the `export` command, run:
You can quickly export with DCE's default settings by using just `-t token` and the channel ID as a positional argument. You can quickly export with DCE's default settings by using just `-t token` and the channel ID as a positional argument.
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 ./dce.sh export -t "mfa.Ifrn" 53555
``` ```
#### Changing the format #### Changing the format
@ -69,7 +69,7 @@ You can change the export format to `HtmlDark`, `HtmlLight`, `PlainText` `Json`
format is `HtmlDark`. format is `HtmlDark`.
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 -f Json ./dce.sh export -t "mfa.Ifrn" 53555 -f Json
``` ```
#### Changing the output filename #### Changing the output filename
@ -77,7 +77,7 @@ format is `HtmlDark`.
You can change the filename by using `-o name.ext`. e.g. for the `HTML` format: You can change the filename by using `-o name.ext`. e.g. for the `HTML` format:
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 -o myserver.html ./dce.sh export -t "mfa.Ifrn" 53555 -o myserver.html
``` ```
#### Changing the output directory #### Changing the output directory
@ -87,7 +87,7 @@ extension.
If any of the folders in the path have a space in its name, escape them with quotes ("). If any of the folders in the path have a space in its name, escape them with quotes (").
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 -o "C:\Discord Exports" ./dce.sh export -t "mfa.Ifrn" 53555 -o "C:\Discord Exports"
``` ```
#### Changing the filename and output directory #### Changing the filename and output directory
@ -97,7 +97,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 ("). If any of the folders in the path have a space in its name, escape them with quotes (").
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 -o "C:\Discord Exports\myserver.html" ./dce.sh export -t "mfa.Ifrn" 53555 -o "C:\Discord Exports\myserver.html"
``` ```
#### Generating the filename and output directory dynamically #### Generating the filename and output directory dynamically
@ -105,7 +105,7 @@ If any of the folders in the path have a space in its name, escape them with quo
You can use template tokens to generate the output file path based on the server and channel metadata. You can use template tokens to generate the output file path based on the server and channel metadata.
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 -o "C:\Discord Exports\%G\%T\%C.html" ./dce.sh export -t "mfa.Ifrn" 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 Assuming you are exporting a channel named `"my-channel"` in the `"Text channels"` category from a server
@ -133,13 +133,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. For example, a channel with 36 messages set to be partitioned every 10 messages will output 4 files.
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 -p 10 ./dce.sh export -t "mfa.Ifrn" 53555 -p 10
``` ```
A 45 MB channel set to be partitioned every 20 MB will output 3 files. A 45 MB channel set to be partitioned every 20 MB will output 3 files.
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 -p 20mb ./dce.sh export -t "mfa.Ifrn" 53555 -p 20mb
``` ```
#### Downloading assets #### Downloading assets
@ -150,7 +150,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. A folder containing the assets will be created along with the exported chat. They must be kept together.
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 --media ./dce.sh export -t "mfa.Ifrn" 53555 --media
``` ```
#### Reusing assets #### Reusing assets
@ -159,7 +159,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. same folder. Using this option can speed up future exports. This option requires the `--media` option.
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 --media --reuse-media ./dce.sh export -t "mfa.Ifrn" 53555 --media --reuse-media
``` ```
#### Changing the media directory #### Changing the media directory
@ -168,7 +168,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. providing a path that ends with a slash. All of the exported media will be stored in this directory.
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 --media --media-dir "C:\Discord Media" ./dce.sh export -t "mfa.Ifrn" 53555 --media --media-dir "C:\Discord Media"
``` ```
#### Changing the date format #### Changing the date format
@ -177,7 +177,7 @@ You can customize how dates are formatted in the exported files by using `--loca
locales. The default locale is `en-US`. locales. The default locale is `en-US`.
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 --locale "de-DE" ./dce.sh export -t "mfa.Ifrn" 53555 --locale "de-DE"
``` ```
#### Date ranges #### Date ranges
@ -186,14 +186,14 @@ locales. The default locale is `en-US`.
Use `--before` to export messages sent before the provided date. E.g. messages sent before September 18th, 2019: Use `--before` to export messages sent before the provided date. E.g. messages sent before September 18th, 2019:
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 --before 2019-09-18 ./dce.sh export -t "mfa.Ifrn" 53555 --before 2019-09-18
``` ```
**Messages sent after a date** **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: Use `--after` to export messages sent after the provided date. E.g. messages sent after September 17th, 2019 11:34 PM:
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 --after "2019-09-17 23:34" ./dce.sh export -t "mfa.Ifrn" 53555 --after "2019-09-17 23:34"
``` ```
**Messages sent in a date range** **Messages sent in a date range**
@ -201,7 +201,7 @@ Use `--before` and `--after` to export messages sent during the provided date ra
September 17th, 2019 11:34 PM and September 18th: September 17th, 2019 11:34 PM and September 18th:
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 --after "2019-09-17 23:34" --before "2019-09-18" ./dce.sh export -t "mfa.Ifrn" 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 You can try different formats like `17-SEP-2019 11:34 PM` or even refine your ranges down to
@ -215,7 +215,7 @@ formats [here](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custo
Use `--filter` to filter what messages are included in the export. Use `--filter` to filter what messages are included in the export.
```console ```console
./DiscordChatExporter.Cli export -t "mfa.Ifrn" 53555 --filter "from:Tyrrrz has:image" ./dce.sh export -t "mfa.Ifrn" 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). Documentation on message filter syntax can be found [here](https://github.com/Tyrrrz/DiscordChatExporter/blob/prime/.docs/Message-filters.md).
@ -227,20 +227,20 @@ To export all channels in a specific server, use `list channels` to list channel
**Linux/macOS** (one-liner, token set inline): **Linux/macOS** (one-liner, token set inline):
```console ```console
DISCORD_TOKEN="mfa.Ifrn" ./DiscordChatExporter.Cli list channels 21814 | ./DiscordChatExporter.Cli export DISCORD_TOKEN="mfa.Ifrn" ./dce.sh list channels 21814 | ./dce.sh export
``` ```
**Windows**: **Windows**:
```console ```console
set DISCORD_TOKEN=mfa.Ifrn set DISCORD_TOKEN=mfa.Ifrn
DiscordChatExporter.Cli list channels 21814 | DiscordChatExporter.Cli export dce.bat list channels 21814 | dce.bat export
``` ```
You can also list channels for multiple guilds at once: You can also list channels for multiple guilds at once:
```console ```console
DISCORD_TOKEN="mfa.Ifrn" ./DiscordChatExporter.Cli list channels 21814 35930 | ./DiscordChatExporter.Cli export DISCORD_TOKEN="mfa.Ifrn" ./dce.sh list channels 21814 35930 | ./dce.sh export
``` ```
#### Including threads #### Including threads
@ -248,7 +248,7 @@ DISCORD_TOKEN="mfa.Ifrn" ./DiscordChatExporter.Cli list channels 21814 35930 | .
By default, threads are not included. You can change this behavior by passing `--include-threads` to the `list channels` command. It has possible values of `none`, `active`, or `all`, indicating which threads should be included. To include both active and archived threads, use `--include-threads all`. By default, threads are not included. You can change this behavior by passing `--include-threads` to the `list channels` command. It has possible values of `none`, `active`, or `all`, indicating which threads should be included. To include both active and archived threads, use `--include-threads all`.
```console ```console
DISCORD_TOKEN="mfa.Ifrn" ./DiscordChatExporter.Cli list channels 21814 --include-threads all | ./DiscordChatExporter.Cli export DISCORD_TOKEN="mfa.Ifrn" ./dce.sh list channels 21814 --include-threads all | ./dce.sh export
``` ```
#### Including voice channels #### Including voice channels
@ -256,7 +256,7 @@ DISCORD_TOKEN="mfa.Ifrn" ./DiscordChatExporter.Cli list channels 21814 --include
By default, voice channels are included. You can change this behavior by passing `--include-vc false` to the `list channels` command. By default, voice channels are included. You can change this behavior by passing `--include-vc false` to the `list channels` command.
```console ```console
DISCORD_TOKEN="mfa.Ifrn" ./DiscordChatExporter.Cli list channels 21814 --include-vc false | ./DiscordChatExporter.Cli export DISCORD_TOKEN="mfa.Ifrn" ./dce.sh list channels 21814 --include-vc false | ./dce.sh export
``` ```
### Export all DMs ### Export all DMs
@ -266,14 +266,14 @@ To export all DMs:
**Linux/macOS**: **Linux/macOS**:
```console ```console
DISCORD_TOKEN="mfa.Ifrn" ./DiscordChatExporter.Cli list channels dm | ./DiscordChatExporter.Cli export DISCORD_TOKEN="mfa.Ifrn" ./dce.sh list channels dm | ./dce.sh export
``` ```
**Windows**: **Windows**:
```console ```console
set DISCORD_TOKEN=mfa.Ifrn set DISCORD_TOKEN=mfa.Ifrn
DiscordChatExporter.Cli list channels dm | DiscordChatExporter.Cli export dce.bat list channels dm | dce.bat export
``` ```
### List channels in a server ### List channels in a server
@ -281,13 +281,13 @@ DiscordChatExporter.Cli list channels dm | DiscordChatExporter.Cli export
To list the channels available in a specific server, use the `list channels` command and provide the server ID as an argument: To list the channels available in a specific server, use the `list channels` command and provide the server ID as an argument:
```console ```console
./DiscordChatExporter.Cli list channels -t "mfa.Ifrn" 21814 ./dce.sh list channels -t "mfa.Ifrn" 21814
``` ```
When the output is redirected or piped, the `list channels` command prints only channel IDs (one per line). This allows you to pipe the output directly to the `export` command: When the output is redirected or piped, the `list channels` command prints only channel IDs (one per line). This allows you to pipe the output directly to the `export` command:
```console ```console
DISCORD_TOKEN="mfa.Ifrn" ./DiscordChatExporter.Cli list channels 21814 | ./DiscordChatExporter.Cli export DISCORD_TOKEN="mfa.Ifrn" ./dce.sh list channels 21814 | ./dce.sh export
``` ```
### List direct message channels ### List direct message channels
@ -295,13 +295,13 @@ DISCORD_TOKEN="mfa.Ifrn" ./DiscordChatExporter.Cli list channels 21814 | ./Disco
To list all DM channels accessible to the current account, use the `list channels dm` command: To list all DM channels accessible to the current account, use the `list channels dm` command:
```console ```console
./DiscordChatExporter.Cli list channels dm -t "mfa.Ifrn" ./dce.sh list channels dm -t "mfa.Ifrn"
``` ```
When the output is redirected or piped, the `list channels dm` command prints only channel IDs (one per line). This allows you to pipe the output directly to the `export` command: When the output is redirected or piped, the `list channels dm` command prints only channel IDs (one per line). This allows you to pipe the output directly to the `export` command:
```console ```console
DISCORD_TOKEN="mfa.Ifrn" ./DiscordChatExporter.Cli list channels dm | ./DiscordChatExporter.Cli export DISCORD_TOKEN="mfa.Ifrn" ./dce.sh list channels dm | ./dce.sh export
``` ```
### List servers ### List servers
@ -309,5 +309,5 @@ DISCORD_TOKEN="mfa.Ifrn" ./DiscordChatExporter.Cli list channels dm | ./DiscordC
To list all servers accessible by the current account, use the `list guilds` command: To list all servers accessible by the current account, use the `list guilds` command:
```console ```console
./DiscordChatExporter.Cli list guilds -t "mfa.Ifrn" > C:\path\to\output.txt ./dce.sh list guilds -t "mfa.Ifrn" > C:\path\to\output.txt
``` ```

View file

@ -9,8 +9,5 @@ namespace DiscordChatExporter.Cli.Commands;
public partial class ListCommand : ICommand public partial class ListCommand : ICommand
{ {
public ValueTask ExecuteAsync(IConsole console) => public ValueTask ExecuteAsync(IConsole console) =>
throw new CommandException( throw new CommandException("Use one of the named commands listed below.", showHelp: true);
"A subcommand is required ('channels', 'channels dm', or 'guilds').",
showHelp: true
);
} }