mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
fix(builders): make type optional in constructor (#7391)
This commit is contained in:
@@ -21,7 +21,7 @@ export class SelectMenuComponent implements Component {
|
||||
public readonly custom_id!: string;
|
||||
public readonly disabled?: boolean;
|
||||
|
||||
public constructor(data?: APISelectMenuComponent) {
|
||||
public constructor(data?: APISelectMenuComponent & { type?: ComponentType.SelectMenu }) {
|
||||
this.options = data?.options.map((option) => new SelectMenuOption(option)) ?? [];
|
||||
this.placeholder = data?.placeholder;
|
||||
this.min_values = data?.min_values;
|
||||
|
||||
Reference in New Issue
Block a user