fix(helpers): error action row constructor

This commit is contained in:
Marcos Susaña 2023-07-24 14:09:53 -04:00
parent 5569d23edd
commit d6ebe07ee7

View File

@ -3,7 +3,7 @@ import { MessageComponents, createComponent } from "../Utils";
import { BaseComponent } from "./BaseComponent";
export class MessageActionRow<T extends MessageComponents> extends BaseComponent<APIActionRowComponent<APIMessageActionRowComponent>> {
constructor({ components, ...data }: Partial<APIActionRowComponent<APIMessageActionRowComponent>>) {
constructor({ components, ...data }: Partial<APIActionRowComponent<APIMessageActionRowComponent>> = {}) {
super({ ...data, type: ComponentType.ActionRow });
this.components = (components?.map(createComponent) ?? []) as T[];
}