refactor(builders-methods): make methods consistent (#7395)

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
Ben
2022-02-12 11:03:13 -07:00
committed by GitHub
parent 861f0e2134
commit f4953647ff
7 changed files with 39 additions and 35 deletions

View File

@@ -34,7 +34,7 @@ export class ActionRow<T extends ActionRowComponent = ActionRowComponent> implem
* Sets the components in this action row
* @param components The components to set this row to
*/
public setComponents(components: T[]) {
public setComponents(...components: T[]) {
Reflect.set(this, 'components', [...components]);
return this;
}

View File

@@ -84,7 +84,7 @@ export class UnsafeSelectMenuComponent implements Component {
* Sets the options on this select menu
* @param options The options to set on this select menu
*/
public setOptions(options: SelectMenuOption[]) {
public setOptions(...options: SelectMenuOption[]) {
Reflect.set(this, 'options', [...options]);
return this;
}