Generate natively styled Discord chat logs
Table of Contents
- Beautiful UI: Modern styling that replicates the look and feel of the Discord desktop client.
- Asynchronous: Built with
CompletableFuturefor high performance. - 100% Offline: Built to contain all information in one file.
Supported Components
-
ComponentsV2
- Markdown: Standard Markup, Mentions, Custom Emojis, and more.
- Message Accessories: Attachments, Embeds, Polls, References, and more.
Important
This project is not affiliated with Discord Inc.
There are 3 ways to use this tool:
Use the referenced library if you're building your bot with any of the following APIs:
| API | Library |
|---|---|
|
Java Discord API |
discord-html-transcript-jda |
|
discord.js |
discord-html-transcript-discordjs |
|
discord.py |
WIP |
For custom Java implementations, you can install the core library directly via Maven or Gradle:
- Java 17+
<dependency>
<groupId>dev.omardiaa</groupId>
<artifactId>discord-html-transcript-core</artifactId>
<version>0.1.0-beta.6</version>
</dependency>implementation("dev.omardiaa:discord-html-transcript-core:0.1.0-beta.6")This section refers to discord-html-transcript-server.
You can download and run the executable as a standalone web server.
| Variable | Description |
|---|---|
DISCORD_HTML_TRANSCRIPT_HOST |
Specifies a custom host for the server.
(default: 127.0.0.1)
|
DISCORD_HTML_TRANSCRIPT_PORT |
Specifies a custom port for the server.
(default: 7000)
|
DISCORD_HTML_TRANSCRIPT_API_KEY |
Specifies a secret key to authenticate client requests. |
| Header | Description |
|---|---|
Server-Version |
Validates the server version required by the client to ensure compatibility.
Required. |
Authorization |
Authenticates client requests.
Required if DISCORD_HTML_TRANSCRIPT_API_KEY is set.
(format: Bearer <DISCORD_HTML_TRANSCRIPT_API_KEY>)
|
| Endpoint | Description |
|---|---|
GET /health |
Retrieves basic server information. |
POST /transcript |
Accepts a transcript Payload and asynchronously generates an HTML byte stream. |
The server validates the Server-Version header using the following rules:
- Pre-release versions must match exactly.
- Major versions must match exactly.
- Server minor version must be greater than or equal to
Server-Versionminor version.
Tip
Request examples can be found here.
You can specify the options object inside your payload to configure the generator:
{
"guild": {},
"channel": {},
"messages": [],
"options": {
"attachment": {
// If set to "true", the generator will download referenced attachments and encode them into the file.
// default: false
"save_images": true
},
"style": {
// If set, the generator will use the styles of the specified path.
// default: null
"path": "path/to/style.css"
}
}
}If you found discord-html-transcript useful, please consider giving it a 🌟!
Need help? Ask the Community!