Skip to content

Embeds and attachments

Embeds have a title, description, link, colour, timestamp, author, footer, up to 25 fields, an image and a thumbnail. Up to 10 per message.

import { EmbedBuilder } from "zaun-client";
const embed = new EmbedBuilder()
.setTitle("Release 1.2")
.setURL("https://example.com/releases/1.2")
.setDescription("What changed")
.setColor(0x5865f2)
.addFields({ name: "Fixes", value: "12", inline: true }, { name: "Features", value: "3", inline: true })
.setImage({ name: "screenshot.png", data: bytes })
.setFooter({ text: "zaun" });
await channel.send({ embeds: [embed] });
await channel.send({ content: "my cat", files: [{ name: "cat.png", data: bytes }] });
// on the other side
const bytes = await message.attachments.first().download();

Files travel as SimpleX files over the same post-quantum connection, each encrypted with a fresh key. Sending returns once the host has checked and stored the files; downloading checks the size and SHA3-256 before anything is saved. The host’s [attachments] settings cap the size (25 MB by default). With your own SMP relay, add an XFTP relay too, or there is no file server.