mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
19 lines
590 B
TypeScript
19 lines
590 B
TypeScript
import type { APIMessageActionRowComponent, ComponentType } from '../common';
|
|
import { BaseComponent } from '../structures/extra/BaseComponent';
|
|
import type { ActionRowMessageComponents } from './index';
|
|
import { componentFactory } from './index';
|
|
|
|
export class MessageActionRowComponent<
|
|
T extends ActionRowMessageComponents,
|
|
> extends BaseComponent<ComponentType.ActionRow> {
|
|
constructor(data: {
|
|
type: ComponentType.ActionRow;
|
|
components: APIMessageActionRowComponent[];
|
|
}) {
|
|
super(data);
|
|
this.components = data.components.map(componentFactory) as T[];
|
|
}
|
|
|
|
components: T[];
|
|
}
|