mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
feat: set methods for MessageActionRow and MessageSelectMenu (#6490)
This commit is contained in:
@@ -59,6 +59,16 @@ class MessageActionRow extends BaseMessageComponent {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the components of the action row.
|
||||
* @param {...MessageActionRowComponentResolvable[]} components The components to set
|
||||
* @returns {MessageActionRow}
|
||||
*/
|
||||
setComponents(...components) {
|
||||
this.spliceComponents(0, this.components.length, components);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes, replaces, and inserts components in the action row.
|
||||
* @param {number} index The index to start at
|
||||
|
||||
@@ -145,6 +145,16 @@ class MessageSelectMenu extends BaseMessageComponent {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the options of the select menu.
|
||||
* @param {...MessageSelectOptionData|MessageSelectOptionData[]} options The options to set
|
||||
* @returns {MessageSelectMenu}
|
||||
*/
|
||||
setOptions(...options) {
|
||||
this.spliceOptions(0, this.options.length, options);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes, replaces, and inserts options in the select menu.
|
||||
* @param {number} index The index to start at
|
||||
|
||||
Reference in New Issue
Block a user