Class

EmbedBuilder

Request-only embed builder. Emits RESTPostAPIEmbed (no video/audio).

Constructor

new EmbedBuilder()

Properties

NameTypeDescription
dataread-onlyPartial<RESTPostAPIEmbed>Partial embed data (built incrementally via setters).

Methods

.setColor(color)

color: number | string | [number, number, number] | nullthis

Set embed color. Pass null to clear.

color
number | string | [number, number, number] | nullNumber (24-bit RGB), hex string (#5865F2), or RGB tuple, or null
embedBuilder.setColor(color);

.setDescription(description)

description: string | nullthis

Set embed description (max 4096 characters). Pass null to clear.

description
string | nullDescription text or null
embedBuilder.setDescription(description);

.setTimestamp(timestamp?)

timestamp?: Date | number | nullthis

Set embed timestamp. Pass null to clear.

timestamp?
Date | number | nullDate object, Unix ms, or undefined (defaults to now), or null
embedBuilder.setTimestamp();

.setTitle(title)

title: string | nullthis

Set embed title (max 256 characters). Pass null to clear.

title
string | nullTitle text or null
embedBuilder.setTitle(title);

.setURL(url)

url: string | nullthis

Set embed URL (title becomes clickable). Pass null to clear.

url
string | nullHTTP(S) URL or null
embedBuilder.setURL(url);