Generate beautiful, secure HTML transcripts from Discord channels.
- Parses Discord formatting: preserves markdown (bold, italics, code, strikethrough), mentions, and embeds.
- Attachment-friendly: renders images, videos, audio and files with optional asset saving.
- Safe by default: built‑in XSS protection and sanitization.
- Themeable output: client-side themes and optional theme switching.
- Simple API:
import { createTranscript } from 'transcriptify'— callcreateTranscript(channel, options). - discord.js support: works with v14 and v15.
Install:
npm i transcriptifyCreate a .env with your bot token:
TOKEN=your_bot_token_here
Example ussage:
import * as discord from "discord.js";
import { config } from "dotenv";
import { createTranscript } from "transcriptify";
config();
const { Guilds, GuildMessages, MessageContent } = discord.GatewayIntentBits;
const client = new discord.Client({ intents: [Guilds, GuildMessages, MessageContent] });
client.on("ready", async () => {
console.log("Logged in as", client.user?.tag);
const channel = await client.channels.fetch("1469427183960199470");
if (!channel || !channel.isTextBased()) {
console.error("Invalid channel provided.");
process.exit(1);
}
console.time("transcript");
const attachment = await createTranscript(channel, {
filename: "test-transcript.html",
});
console.timeEnd("transcript");
console.log("✓ Generated:", attachment?.name ?? attachment);
await client.destroy();
process.exit(0);
});
client.login(process.env.TOKEN as string);See the docs for a short usage guide and options: docs/usage.md.
Preview:
- Inspired by: ItzDerock/discord-html-transcripts
- Design / UI suggestions: GitHub Copilot
License: MIT — see LICENSE
