Skip to main content
embed() declares an embed, from any file of src/. It takes the embed itself, or a function that returns one.
src/components/welcome.ts
How to write and use an embed file is in the guide. What an embed can hold is Embed.

embed()

Declares an embed. Export the result from any file of src/. Give it the embed itself when it always looks the same, or a function of what it shows. A static embed is checked against the limits of Discord when the file loads; the embed a function returns is checked when the message is sent.

EmbedDeclaration

What embed() returns: a declaration the framework finds in the exports of a file. Import it where you send a message: embeds: [welcome({ member })], or embeds: [rules] for an embed that always looks the same.
unknown
What the file gave to embed(), not checked yet.
The embeds of a message take an Embed or an EmbedDeclaration<[]>: an embed that needs arguments must be called.