mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
fix(builders): make type optional in constructor (#7391)
This commit is contained in:
@@ -16,7 +16,7 @@ export class ActionRow<T extends ActionRowComponent = ActionRowComponent> implem
|
||||
public readonly components: T[] = [];
|
||||
public readonly type = ComponentType.ActionRow;
|
||||
|
||||
public constructor(data?: APIActionRowComponent) {
|
||||
public constructor(data?: APIActionRowComponent & { type?: ComponentType.ActionRow }) {
|
||||
this.components = (data?.components.map(createComponent) ?? []) as T[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user