Skip to content

A java library for generating nicely formatted HTML transcripts with JDA

Notifications You must be signed in to change notification settings

Artillex-Studios/discord-html-transcripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord (JDA) HTML Transcripts

Discord HTML Transcripts is a node.js module (recode on JDA) to generate nice looking HTML transcripts. Processes discord markdown like bold, italics, strikethroughs, and more. Nicely formats attachments and embeds. Built in XSS protection, preventing users from inserting html tags.

This module is designed to work with JDA 5.

HTML Template stolen from DiscordChatExporter.

Installation

<repositories>
    <repository>
	<id>jitpack.io</id>
	<url>https://jitpack.io</url>
    </repository>
</repositories>
<dependency>
    <groupId>com.github.Inkception</groupId>
    <artifactId>discord-html-transcripts</artifactId>
    <version>Tag</version>
</dependency>

Example Output

output

Usage

Example usage using the built in message fetcher.

DiscordHtmlTranscripts transcript = DiscordHtmlTranscripts.getInstance();
textChannel.sendFiles(transcript.createTranscript(textChannel)).queue()

Or if you prefer, you can pass in your own messages.

DiscordHtmlTranscripts transcript = DiscordHtmlTranscripts.getInstance();
transcript.generateFromMessages(messages); // return to InputStream

About

A java library for generating nicely formatted HTML transcripts with JDA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 62.4%
  • HTML 37.6%