Skip to content

Commit

Permalink
fix(SelectMenuBuilder): options array (#7826)
Browse files Browse the repository at this point in the history
  • Loading branch information
hibanka committed Apr 22, 2022
1 parent 61a44c5 commit 3617093
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/discord.js/src/structures/SelectMenuBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SelectMenuBuilder extends BuildersSelectMenu {
* @param {APISelectMenuOption[]} options The options to add to this select menu
* @returns {SelectMenuBuilder}
*/
addOptions(...options) {
addOptions(options) {
return super.addOptions(
options.map(({ emoji, ...option }) => ({
...option,
Expand All @@ -40,7 +40,7 @@ class SelectMenuBuilder extends BuildersSelectMenu {
* @param {APISelectMenuOption[]} options The options to set on this select menu
* @returns {SelectMenuBuilder}
*/
setOptions(...options) {
setOptions(options) {
return super.setOptions(
options.map(({ emoji, ...option }) => ({
...option,
Expand Down
4 changes: 2 additions & 2 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,10 @@ export class ButtonBuilder extends BuilderButtonComponent {
export class SelectMenuBuilder extends BuilderSelectMenuComponent {
public constructor(data?: Partial<SelectMenuComponentData | APISelectMenuComponent>);
public override addOptions(
...options: (BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption)[]
options: (BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption)[],
): this;
public override setOptions(
...options: (BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption)[]
options: (BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption)[],
): this;
public static from(other: JSONEncodable<APISelectMenuComponent> | APISelectMenuComponent): SelectMenuBuilder;
}
Expand Down

0 comments on commit 3617093

Please sign in to comment.