mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
fix(SelectMenuBuilder): options array (#7826)
This commit is contained in:
@@ -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,
|
||||
@@ -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,
|
||||
|
||||
4
packages/discord.js/typings/index.d.ts
vendored
4
packages/discord.js/typings/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user