mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
refactor: use arrays instead of rest parameters for builders (#7759)
This commit is contained in:
@@ -38,7 +38,7 @@ export class ActionRowBuilder<T extends AnyComponentBuilder> extends ComponentBu
|
||||
* @param components The components to add to this action row.
|
||||
* @returns
|
||||
*/
|
||||
public addComponents(...components: T[]) {
|
||||
public addComponents(components: T[]) {
|
||||
this.components.push(...components);
|
||||
return this;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ export class ActionRowBuilder<T extends AnyComponentBuilder> extends ComponentBu
|
||||
* 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user