Readonly
dataAppends fields to the embed.
Rest
...fields: RestOrArray<APIEmbedField>The fields to add
This method accepts either an array of fields or a variable number of field parameters. The maximum amount of fields that can be added is 25.
Using an array:
const fields: APIEmbedField[] = ...;
const embed = new EmbedBuilder()
.addFields(fields);
Using rest parameters (variadic):
const embed = new EmbedBuilder()
.addFields(
{ name: 'Field 1', value: 'Value 1' },
{ name: 'Field 2', value: 'Value 2' },
);
Sets the author of this embed.
The options to use
Sets the description of this embed.
The description to use
Sets the fields for this embed.
Rest
...fields: RestOrArray<APIEmbedField>The fields to set
This method is an alias for spliceFields. More specifically, it splices the entire array of fields, replacing them with the provided fields.
You can set a maximum of 25 fields.
Sets the footer of this embed.
The footer to use
Sets the image of this embed.
The image URL to use
Sets the thumbnail of this embed.
The thumbnail URL to use
Sets the timestamp of this embed.
Optional
timestamp: null | number | DateThe timestamp or date to use
Sets the title for this embed.
The title to use
Sets the URL of this embed.
The URL to use
Removes, replaces, or inserts fields for this embed.
The index to start at
The number of fields to remove
Rest
...fields: APIEmbedField[]The replacing field objects
This method behaves similarly to Array.prototype.splice(). The maximum amount of fields that can be added is 25.
It's useful for modifying and adjusting order of the already-existing fields of an embed.
Remove the first field:
embed.spliceFields(0, 1);
Remove the first n fields:
const n = 4;
embed.spliceFields(0, n);
Remove the last field:
embed.spliceFields(-1, 1);
Static
fromGenerated using TypeDoc
The API data associated with this embed.