Skip to main content

Discord Features

These render Discord-specific content. They show up automatically when the matching data is present in a message - no extra options needed (except thread expansion).

Polls​

Renders Discord polls with vote bars, percentages, emoji, and winner highlighting.

Just include a poll field on the message and it shows up automatically.

const message = {
id: "1",
type: 0,
content: "",
author: { id: "123", username: "someone" },
timestamp: new Date().toISOString(),
poll: {
question: { text: "Favorite language?" },
answers: [
{
answerId: 1,
pollMedia: { text: "TypeScript", emoji: { name: "🔷", id: null } },
count: 15,
},
{
answerId: 2,
pollMedia: { text: "Rust", emoji: { name: "🦀", id: null } },
count: 8,
},
{
answerId: 3,
pollMedia: { text: "Python", emoji: { name: "🐍", id: null } },
count: 12,
},
],
allowMultiselect: false,
isFinalized: true,
},
};

How it looks:

  • Each answer gets a progress bar with vote count and percentage
  • With isFinalized: true, the header says "Final Results" and the winner is highlighted green
  • Without that flag, it just says "Poll"
  • Emoji show up next to each answer

Slash Command Context​

Messages of type 20 (ChatInputCommand) or 23 (ContextMenuCommand) get a "used /command" line above the message, just like in Discord.

Shows up when the message has type 20/23 and an interaction field.

const message = {
id: "1",
type: 20, // ChatInputCommand
content: "Here are the lookup results...",
author: { id: "100", username: "bot", bot: true },
timestamp: new Date().toISOString(),
interaction: {
name: "lookup",
user: {
id: "200",
username: "kai",
globalName: "Kai",
avatar: null,
},
},
};

This shows who triggered the command and which one they used (e.g. "Kai used /lookup").


Voice Messages​

Shows a waveform visualization with a play button and duration, just like Discord's voice messages.

Shows up when a message has a voiceMessage field.

const message = {
id: "1",
type: 0,
content: "",
author: { id: "123", username: "someone" },
timestamp: new Date().toISOString(),
voiceMessage: {
duration: 12, // seconds
waveform: Buffer.from(new Uint8Array(256).map(() =>
Math.floor(Math.random() * 255)
)).toString("base64"),
},
attachments: [
{
id: "v1",
filename: "voice-message.ogg",
contentType: "audio/ogg",
size: 24576,
url: "https://cdn.discordapp.com/attachments/.../voice-message.ogg",
},
],
};

How it works:

  • The waveform data is base64-decoded into visual bars
  • Each byte represents one bar's height (0-255)
  • If there's no waveform data, a flat default is used
  • Duration shows as m:ss
  • Links to the audio attachment for playback

Forwarded Messages​

Forwarded messages are rendered with a "Forwarded" label above the original content, including its attachments, embeds and stickers, and the original timestamp.

createTranscript picks these up automatically (discord.js 14.16 or newer). With your own data, put the forwarded content in messageSnapshots:

const message = {
id: "1",
type: 0,
content: "",
author: { id: "123", username: "someone" },
timestamp: "2026-03-15T14:00:00.000Z",
messageReference: { messageId: "456", channelId: "789" },
messageSnapshots: [
{
content: "The original message text",
timestamp: "2026-03-14T09:30:00.000Z",
attachments: [],
embeds: [],
},
],
};

Threads and Forum Posts​

createTranscript accepts any guild channel that holds messages: text and announcement channels, threads, forum posts (which are threads), and the text chat of voice and stage channels.

// inside a thread or forum post
if (interaction.channel?.isThread()) {
const result = await createTranscript(interaction.channel);
}

For threads the header shows a thread icon, and the opening block reads "This is the start of the thread." With your own data, set channel.type to DiscordChannelType.PublicThread, PrivateThread or AnnouncementThread.


Thread Expansion​

With expandThreads: true enabled and thread messages included in the data, a "Show thread" toggle appears below the thread indicator. Click it to see the thread messages right there inline.

info

Requires the expandThreads option to be enabled.

const message = {
id: "1",
type: 0,
content: "Let's discuss this in a thread",
author: { id: "123", username: "someone" },
timestamp: new Date().toISOString(),
thread: {
id: "t1",
name: "Discussion Thread",
messageCount: 2,
messages: [
{
id: "t1-1",
type: 0,
content: "First reply in thread",
author: { id: "456", username: "replier" },
timestamp: new Date().toISOString(),
},
{
id: "t1-2",
type: 0,
content: "Second reply in thread",
author: { id: "789", username: "another" },
timestamp: new Date().toISOString(),
},
],
},
};

How it looks:

  • Thread messages appear inline with a left border
  • Toggle says "Show thread (N replies)" / "Hide thread"
  • Each reply is fully rendered with avatar, timestamp, and content
  • The thread name shows in the indicator bar

AutoMod Messages​

AutoMod system messages (type 24) show up with a shield icon and an "AutoMod" label instead of the normal bot tag.

const message = {
id: "1",
type: 24,
content: "",
author: {
id: "0",
username: "AutoMod",
bot: true,
},
timestamp: new Date().toISOString(),
embeds: [
{
description: "⚠️ Message blocked: contains prohibited content",
color: 0xed4245,
},
],
};

Just set the message type to 24 and it renders with the AutoMod styling.