Package dev.skywolfxp.transcript
Class Transcript
java.lang.Object
dev.skywolfxp.transcript.Transcript
Represents a generated Transcript in HTML of your Discord Text Channel.
Provides access to the
Uses Java Template Engine for HTML generation.
Provides access to the
TemplateEngine
used and the Utf8ByteOutput.
Uses Java Template Engine for HTML generation.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructsTranscriptwithTemplateEngineprecompiled template configuration.Transcript(gg.jte.TemplateEngine templateEngine) ConstructsTranscriptwith providedTemplateEngine. -
Method Summary
Modifier and TypeMethodDescriptiongg.jte.TemplateEnginegg.jte.output.Utf8ByteOutputvoidConverts the output to a specifiedFile.net.dv8tion.jda.api.utils.FileUploadtoFileUpload(String fileName) Converts the output to aFileUploadto directly send anywhere on Discord.
-
Constructor Details
-
Transcript
public Transcript()ConstructsTranscriptwithTemplateEngineprecompiled template configuration. -
Transcript
public Transcript(@NotNull gg.jte.TemplateEngine templateEngine) ConstructsTranscriptwith providedTemplateEngine.- Parameters:
templateEngine- TheTemplateEngineto use for Transcript generation.
-
-
Method Details
-
getTemplateEngine
@NotNull public gg.jte.TemplateEngine getTemplateEngine() -
getUtf8ByteOutput
@NotNull public gg.jte.output.Utf8ByteOutput getUtf8ByteOutput() -
toFileUpload
Converts the output to aFileUploadto directly send anywhere on Discord.
ThefileNameis appended with.htmlif it is not suffixed with it.- Parameters:
fileName- The file name to use for the generated Transcript.- Returns:
- A
FileUploadof the generated Transcript.
-
toFile
Converts the output to a specifiedFile.- Parameters:
file- TheFileto which the transcript should be written.- Throws:
IOException- If an I/O error occurs during file writing.
-