Class Transcript

java.lang.Object
dev.skywolfxp.transcript.Transcript

public final class Transcript extends Object
Represents a generated Transcript in HTML of your Discord Text Channel.

Provides access to the TemplateEngine used and the Utf8ByteOutput.

Uses Java Template Engine for HTML generation.
  • Constructor Details

    • Transcript

      public Transcript()
      Constructs Transcript with TemplateEngine precompiled template configuration.
    • Transcript

      public Transcript(@NotNull gg.jte.TemplateEngine templateEngine)
      Constructs Transcript with provided TemplateEngine.
      Parameters:
      templateEngine - The TemplateEngine to use for Transcript generation.
  • Method Details

    • getTemplateEngine

      @NotNull public gg.jte.TemplateEngine getTemplateEngine()
    • getUtf8ByteOutput

      @NotNull public gg.jte.output.Utf8ByteOutput getUtf8ByteOutput()
    • toFileUpload

      @NotNull public net.dv8tion.jda.api.utils.FileUpload toFileUpload(@NotNull String fileName)
      Converts the output to a FileUpload to directly send anywhere on Discord.

      The fileName is appended with .html if it is not suffixed with it.
      Parameters:
      fileName - The file name to use for the generated Transcript.
      Returns:
      A FileUpload of the generated Transcript.
    • toFile

      public void toFile(@NotNull File file) throws IOException
      Converts the output to a specified File.
      Parameters:
      file - The File to which the transcript should be written.
      Throws:
      IOException - If an I/O error occurs during file writing.