.addFields(fields)
fields: EmbedFieldData[] → this
Add fields (up to 25 total). Existing fields are preserved.
- fields
EmbedFieldData[]Field objects to append
embedBuilder.addFields(fields);Class
Request-only embed builder. Emits RESTPostAPIEmbed (no video/audio).
new EmbedBuilder()| Name | Type | Description |
|---|---|---|
| dataread-only | Partial<RESTPostAPIEmbed> | Partial embed data (built incrementally via setters). |
fields: EmbedFieldData[] → this
Add fields (up to 25 total). Existing fields are preserved.
EmbedFieldData[]Field objects to appendembedBuilder.addFields(fields);data: APIEmbed | RESTPostAPIEmbed | EmbedFromInput → EmbedBuilder
Copy request fields only. Response video/audio/type/provider are ignored. Accepts wire APIEmbed / RESTPostAPIEmbed or a camelCase received embed.
APIEmbed | RESTPostAPIEmbed | EmbedFromInputAPI embed from message or webhookEmbedBuilder.from(data);options: EmbedAuthorOptions | null → this
Set embed author. Pass null to clear.
EmbedAuthorOptions | nullAuthor name, icon URL, and URL, or nullembedBuilder.setAuthor(options);color: number | string | [number, number, number] | null → this
Set embed color. Pass null to clear.
number | string | [number, number, number] | nullNumber (24-bit RGB), hex string (#5865F2), or RGB tuple, or nullembedBuilder.setColor(color);description: string | null → this
Set embed description (max 4096 characters). Pass null to clear.
string | nullDescription text or nullembedBuilder.setDescription(description);fields: EmbedFieldData[] → this
Replace all fields (max 25). Pass empty array to clear.
EmbedFieldData[]Field objects (name, value, inline)embedBuilder.setFields(fields);options: EmbedFooterOptions | null → this
Set embed footer. Pass null to clear.
EmbedFooterOptions | nullFooter text and optional icon URL, or nullembedBuilder.setFooter(options);input: string | EmbedMediaOptions | null → this
Set embed image (large media below description). Pass null to clear.
string | EmbedMediaOptions | nullURL string or media options, or nullembedBuilder.setImage(input);input: string | EmbedMediaOptions | null → this
Set embed thumbnail (small media in top-right corner). Pass null to clear.
string | EmbedMediaOptions | nullURL string or media options, or nullembedBuilder.setThumbnail(input);timestamp?: Date | number | null → this
Set embed timestamp. Pass null to clear.
Date | number | nullDate object, Unix ms, or undefined (defaults to now), or nullembedBuilder.setTimestamp();title: string | null → this
Set embed title (max 256 characters). Pass null to clear.
string | nullTitle text or nullembedBuilder.setTitle(title);url: string | null → this
Set embed URL (title becomes clickable). Pass null to clear.
string | nullHTTP(S) URL or nullembedBuilder.setURL(url);index: number, deleteCount: number, fields: EmbedFieldData[] → this
Splice fields (like Array.prototype.splice).
numberStart indexnumberNumber of fields to removeEmbedFieldData[]Fields to insert at indexembedBuilder.spliceFields(index, deleteCount, fields);