mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00

* fix: github actions * fix: pnpm version * fix: github actions checkout * fix: brackets in failure function * fix: github actions * fix: github actions * fix: github actions * fix: github actions * fix: github actions * fix: github actions * fix: github actions * fix: github actions * chore: apply formatting * fix: github actions --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
22 lines
683 B
TypeScript
22 lines
683 B
TypeScript
import type { APIMessageActionRowComponent, ComponentType } from 'discord-api-types/v10';
|
|
import { BaseComponent } from './BaseComponent';
|
|
import type { ActionRowMessageComponents } from './index';
|
|
import { componentFactory } from './index';
|
|
|
|
export class MessageActionRowComponent<
|
|
T extends ActionRowMessageComponents,
|
|
> extends BaseComponent<ComponentType.ActionRow> {
|
|
private ComponentsFactory: T[];
|
|
constructor(data: {
|
|
type: ComponentType.ActionRow;
|
|
components: APIMessageActionRowComponent[];
|
|
}) {
|
|
super(data);
|
|
this.ComponentsFactory = data.components.map(componentFactory) as T[];
|
|
}
|
|
|
|
get components() {
|
|
return this.ComponentsFactory;
|
|
}
|
|
}
|