This javascript library is a wrapper for Tyrrz/DiscordChatExporter tool.
For more information read the wiki section Using CLI of the tool.
npm install discord-chat-exporter
yarn add discord-chat-exporter
Variable name | Description | Required | Default value |
---|---|---|---|
DISCORD_BOT_TOKEN | Your private discord bot token | ✓ | |
DOTNET_BIN | Path to the dotnet binary. Default binary provided by dotnet-3.1 dependency |
✕ | dotnet |
DISCORD_CHAT_EXPORTER_CLI_BIN | Path to discord chat exporter dll binary | ✕ | node_modules/discord-chat-exporter/cli/DiscordChatExporter.Cli.dll |
DISCORD_CHAT_EXPORTER_OUTPUT_DIR | Directory where export process will output their files | ✕ | output |
DISCORD_CHAT_EXPORTER_FORMAT | Directory where export process will output their files | ✕ | HtmlDark |
This library use a notion of Executor
. An executor is there to ease the interaction with the discord chat exporter binary.
Each executor map a specific command. You can retrieve the command list on the wiki of original tool.
For each executor except the RawExecutor
we inject automatically some option like your Discord bot token
, format
and ouput
.
This executor give you the possibility to build the command yourself.
const executor = new RawExecutor('export -c CHANNEL_ID -t BOT_TOKEN -b')
Read the original wiki to know how to compose your command.
You need to inject yourself each option in the command.
Wrapper for export command.
const executor = new ExportExecutor({channel: 'CHANNEL_ID'})
For more details about available options see ExportOptions.