0.3.0 • Published 2 years ago

discord-chat-exporter v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Discord chat exporter

This javascript library is a wrapper for Tyrrz/DiscordChatExporter tool.\ For more information read the wiki section Using CLI of the tool.

Installation

Using npm

npm install discord-chat-exporter

Using yarn

yarn add discord-chat-exporter

Environment variables

Variable nameDescriptionRequiredDefault value
DISCORD_BOT_TOKENYour private discord bot token
DOTNET_BINPath to the dotnet binary. Default binary provided by dotnet-3.1 dependencydotnet
DISCORD_CHAT_EXPORTER_CLI_BINPath to discord chat exporter dll binarynode_modules/discord-chat-exporter/cli/DiscordChatExporter.Cli.dll
DISCORD_CHAT_EXPORTER_OUTPUT_DIRDirectory where export process will output their filesoutput
DISCORD_CHAT_EXPORTER_FORMATDirectory where export process will output their filesHtmlDark

Usage

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.

Executor

For each executor except the RawExecutor we inject automatically some option like your Discord bot token, format and ouput.

RawExecutor

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.

ExportExecutor

Wrapper for export command.

const executor = new ExportExecutor({channel: 'CHANNEL_ID'})

For more details about available options see ExportOptions.