npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

spectre-html-transcripts

v3.3.1

Published

A nicely formatted html transcript generator for discord.js-selfbot-v13.

Readme

spectre-html-transcripts (Selfbot v13)

Discord npm GitHub package.json version GitHub Repo stars

Spectre HTML Transcripts is a node.js module 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 arbitrary html tags.

This module can format the following:

  • Discord flavored markdown
  • Embeds
  • System messages
    • Join messages
    • Message Pins
    • Boost messages
  • Slash commands
    • Will show the name of the command in the same style as Discord
  • Buttons
  • Reactions
  • Attachments
    • Images, videos, audio, and generic files
  • Replies
  • Mentions
  • Threads

This fork targets discord.js-selfbot-v13 (selfbot) and supports its v3.x releases.

Styles from @derockdev/discord-components. Behind the scenes, this package uses React SSR to generate a static site.

Selfbot (discord.js-selfbot-v13) notes ⚠️

This fork is tailored to work with discord.js-selfbot-v13 (v3.x). Install it in your project and ensure it's available as a peer dependency:

npm install discord.js-selfbot-v13@^3.7.1

Note: Using selfbots may violate Discord's Terms of Service. Use at your own risk.


Credits

This package is a complete overhaul (a fork) of the original discord-html-transcripts project by ItzDerock. All credits for the original concept and base code go to him. Please give the original project a star ⭐ and/or support the original creator on Ko-fi.


👋 Support

For support, please open a thread on this server or send a DM to qorp on Discord. / Pour tout support, ouvrez un thread sur ce serveur ou envoyez un DM à qorp sur Discord.

🖨️ Example Output

output

📝 Usage

Example usage using the built in message fetcher.

const spectreTranscripts = require('spectre-html-transcripts');
// or (if using typescript) import * as spectreTranscripts from 'spectre-html-transcripts';

const channel = message.channel; // or however you get your TextChannel

// Must be awaited
const attachment = await spectreTranscripts.createTranscript(channel);

channel.send({
  files: [attachment],
});

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

const spectreTranscripts = require('spectre-html-transcripts');
// or (if using typescript) import * as spectreTranscripts from 'spectre-html-transcripts';

const messages = someWayToGetMessages(); // Must be Collection<string, Message> or Message[]
const channel = someWayToGetChannel(); // Used for ticket name, guild icon, and guild name

// Must be awaited
const attachment = await spectreTranscripts.generateFromMessages(messages, channel);

channel.send({
  files: [attachment],
});

⚙️ Configuration

Both methods of generating a transcript allow for an option object as the last parameter. All configuration options are optional!

Built in Message Fetcher

const attachment = await discordTranscripts.createTranscript(channel, {
    limit: -1, // Max amount of messages to fetch. `-1` recursively fetches.
    returnType: 'attachment', // Valid options: 'buffer' | 'string' | 'attachment' Default: 'attachment' OR use the enum ExportReturnType
    filename: 'transcript.html', // Only valid with returnType is 'attachment'. Name of attachment.
    saveImages: false, // Download all images and include the image data in the HTML (allows viewing the image even after it has been deleted) (! WILL INCREASE FILE SIZE !)
    footerText: "Exported {number} message{s}", // Change text at footer, don't forget to put {number} to show how much messages got exported, and {s} for plural
    callbacks: {
      // register custom callbacks for the following:
      resolveChannel: (channelId: string) => Awaitable<Channel | null>,
      resolveUser: (userId: string) => Awaitable<User | null>,
      resolveRole: (roleId: string) => Awaitable<Role | null>,
      resolveImageSrc: (
        attachment: APIAttachment,
        message: APIMessage
      ) => Awaitable<string | null | undefined>
    },
    poweredBy: true, // Whether to include the "Powered by spectre-html-transcripts" footer
    hydrate: true, // Whether to hydrate the html server-side
    filter: (message) => true // Filter messages, e.g. (message) => !message.author.bot
});

Providing your own messages

const attachment = await discordTranscripts.generateFromMessages(messages, channel, {
  // Same as createTranscript, except no limit or filter
});

Compressing images

If saveImages is set to true, all images will be downloaded and stored in the file as-is. You can optionally enable compression by installing the sharp module and setting the following options:

callbacks: {
  resolveImageSrc: new TranscriptImageDownloader()
    .withMaxSize(5120) // 5MB in KB
    .withCompression(40, true) // 40% quality, convert to webp
    .build(),
},

Note that, in a more advanced setup, you could store a copy of the files and return an entirely new URL pointing to your own image hosting site by implementing a custom resolveImageSrc function.

🤝 Enjoy the package?

Give it a star ⭐ and/or support the original creator on Ko-fi.

This package is a complete overhaul (fork) of the original discord-html-transcripts project by ItzDerock. All credits for the original concept and base code go to him. Thanks !