Private
autoPrivate
buildPrivate
collectorProtected
componentsPrivate
currentReadonly
dataPrivate
defaultPrivate
endPrivate
endPrivate
filesReadonly
interactionCommon
Private
listenListen
Private
listenPrivate
loopPrivate
messagePrivate
Optional
messagePrivate
pagesPages
Private
paginationPrivate
timeoutPrivate
triggersTriggers
Method for adding components to available row
Appends fields to the embed
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' },
);
Rest
...fields: RestOrArray<APIEmbedField>The fields to add
Method for adding files to the end
Method for adding listening to specific users
Method for adding pages to the end
Method for adding triggers
Method for auto generating pages
builder.autoGeneratePages({
items: [
'Player 1',
'Player 2',
'Player 3'
],
countPerPage: 2
});
Method for resetting the current listening timer
Sets the author of this embed
The options for the author
Method for setting the timer to automatically reset when switching between pages
Method for setting components rows
Method for setting default buttons
builder.setDefaultButtons(['first', {
stop: new ButtonComponent()
.setLabel('Stop')
.setStyle('PRIMARY')
}]);
Sets the description of this embed
The description
Sets the embed's fields
This method is an alias for EmbedBuilder.spliceFields. More specifically, it splices the entire array of fields, replacing them with the provided fields.
You can set a maximum of 25 fields.
Rest
...fields: RestOrArray<APIEmbedField>The fields to set
Method for initial files setup
Sets the footer of this embed
The options for the footer
Sets the image of this embed
The URL of the image
Method for setting embed color at the end of listening
Method for setting the method of working with a message when you finish listening for reactions
Method for setting the time to listen for updates to switch pages
Method for setting listening to specific users
Method for setting endless page switching when reaching the end
Method for initial pages setup
builder.setPages(
new Embed()
.setTitle('Hello World!')
);
builder.setPages([
new Embed()
.setTitle('Hello World!'),
() => (
new Embed()
.setTitle('Function page')
)
]);
Method for setting the pagination format
%c - Current page %m - Max page
builder.setPaginationFormat('Current page: %c, Max: %m');
Sets the thumbnail of this embed
The URL of the thumbnail
Sets the timestamp of this embed
Optional
timestamp: null | number | DateThe timestamp or date
Sets the title of this embed
The title
Method for initial setting of triggers
Sets the URL of this embed
The URL
Removes, replaces, or inserts fields in the embed.
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);
The index to start at
The number of fields to remove
Rest
...fields: APIEmbedField[]The replacing field objects
Method for update existing components
const button = new ButtonComponent()
.setCustomId('test')
.setLabel('Test button')
.setStyle('PRIMARY');
builder.addComponents(button);
button.setLabel('Primary button');
builder.updateComponents(button);
builder.rerender();
Static
fromGenerated using TypeDoc
Components