mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
fix(components): setX should take rest parameters (#7461)
This commit is contained in:
@@ -35,7 +35,7 @@ export class ActionRow<T extends ActionRowComponent = ActionRowComponent> extend
|
||||
* Sets the components in this action row
|
||||
* @param components The components to set this row to
|
||||
*/
|
||||
public setComponents(components: T[]) {
|
||||
public setComponents(...components: T[]) {
|
||||
this.components.splice(0, this.components.length, ...components);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ export class UnsafeSelectMenuComponent extends Component<
|
||||
* Sets the options on this select menu
|
||||
* @param options The options to set on this select menu
|
||||
*/
|
||||
public setOptions(options: UnsafeSelectMenuOption[]) {
|
||||
public setOptions(...options: UnsafeSelectMenuOption[]) {
|
||||
this.options.splice(0, this.options.length, ...options);
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user