JSPM

@kazami-devs/transcripts

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q67522F
  • License MIT

Generate beautiful HTML transcripts from discord.js channels.

Package Exports

  • @kazami-devs/transcripts
  • @kazami-devs/transcripts/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kazami-devs/transcripts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Kazami Transcipts

Generate beautiful HTML transcripts from Discord text channels using Discord.Js.

Lightweight, customizable and easy to use.


Features

  • Generate full HTML transcripts
  • Locale & timezone support
  • Custom Mustache template support
  • Fast message fetching
  • Built for Discord.Js
  • TypeScript support

Installation

npm install @kazami-devs/transcripts

Basic Usage

const { createTranscript } = require('@kazami-devs/transcripts')
const { AttachmentBuilder } = require('discord.js')

const transcript = await createTranscript(channel)

const attachment = new AttachmentBuilder(
  Buffer.from(transcript.html, 'utf-8'),
  { name: transcript.fileName }
)

await interaction.reply({
  content: 'Transcript created successfully!',
  files: [attachment],
})

Advanced Usage

const transcript = await createTranscript(channel, {
  guildName: interaction.guild.name,
  locale: 'pt-BR',
  timezone: 'America/Sao_Paulo',
  limit: -1, // fetch all messages
})

Options

Option Type Default Description
limit number 100 Number of messages to fetch (-1 = all)
guildName string Guild name displayed in transcript
locale string en-US Date formatting locale
timezone string UTC Timezone for timestamps

Return Value

{
  fileName: string
  html: string
}

Peer Dependencies

discord.js ^14.0.0

License

This project is licensed under the MIT license. Feel free to contribute!

Author

Developed with love by Camilla Viana 💜

❤️ Contributing

Pull requests are welcome. If you'd like to suggest improvements, feel free to open an issue.