mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +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
|
* @param {APISelectMenuOption[]} options The options to add to this select menu
|
||||||
* @returns {SelectMenuBuilder}
|
* @returns {SelectMenuBuilder}
|
||||||
*/
|
*/
|
||||||
addOptions(...options) {
|
addOptions(options) {
|
||||||
return super.addOptions(
|
return super.addOptions(
|
||||||
options.map(({ emoji, ...option }) => ({
|
options.map(({ emoji, ...option }) => ({
|
||||||
...option,
|
...option,
|
||||||
@@ -40,7 +40,7 @@ class SelectMenuBuilder extends BuildersSelectMenu {
|
|||||||
* @param {APISelectMenuOption[]} options The options to set on this select menu
|
* @param {APISelectMenuOption[]} options The options to set on this select menu
|
||||||
* @returns {SelectMenuBuilder}
|
* @returns {SelectMenuBuilder}
|
||||||
*/
|
*/
|
||||||
setOptions(...options) {
|
setOptions(options) {
|
||||||
return super.setOptions(
|
return super.setOptions(
|
||||||
options.map(({ emoji, ...option }) => ({
|
options.map(({ emoji, ...option }) => ({
|
||||||
...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 {
|
export class SelectMenuBuilder extends BuilderSelectMenuComponent {
|
||||||
public constructor(data?: Partial<SelectMenuComponentData | APISelectMenuComponent>);
|
public constructor(data?: Partial<SelectMenuComponentData | APISelectMenuComponent>);
|
||||||
public override addOptions(
|
public override addOptions(
|
||||||
...options: (BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption)[]
|
options: (BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption)[],
|
||||||
): this;
|
): this;
|
||||||
public override setOptions(
|
public override setOptions(
|
||||||
...options: (BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption)[]
|
options: (BuildersSelectMenuOption | SelectMenuComponentOptionData | APISelectMenuOption)[],
|
||||||
): this;
|
): this;
|
||||||
public static from(other: JSONEncodable<APISelectMenuComponent> | APISelectMenuComponent): SelectMenuBuilder;
|
public static from(other: JSONEncodable<APISelectMenuComponent> | APISelectMenuComponent): SelectMenuBuilder;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user