Skip to content

Embeds are rich cards attached to a message:

import { EmbedBuilder } from '@zaun/bot';
interaction.reply({
embeds: [
new EmbedBuilder()
.setTitle('Build #412 passed')
.setURL('https://ci.example.org/412')
.setDescription('All 1 204 tests green.')
.setColor(0x2ecc71)
.addFields(
{ name: 'Duration', value: '6 min', inline: true },
{ name: 'Commit', value: '`995900c`', inline: true },
)
.setFooter({ text: 'CI bot' }),
],
});
Field Limit
title ≤ 256
description ≤ 4 096
fields ≤ 25; name ≤ 256, value ≤ 1 024
author name / footer text ≤ 256 / ≤ 2 048
per message ≤ 10 embeds, ≤ 6 000 characters of text in all
  • Pictures (image, thumbnail, author and footer icons) are attachments of the same message, never URLs. Upload them first (needs the attachments capability): bot.messages.upload(..) in TypeScript, zaun_bot::messages::upload in Rust; then setImage(attachmentId).
  • Links are https:// only, with no user name or password, and open only when clicked.
  • An embed must show something: a title, description, author, footer, picture or field.
  • Embeds need the EMBED_LINKS permission.