mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 12:36:08 +00:00

* feat: add support for new Discord application emojis features * feat: add support for new Discord application emojis features * feat: applications emojis routes * chore: switch typings provider * fix: unnecesary type * feat: magic bytes * chore: move api-types * chore: ? * fix: omg npm * chore: apply formatting * fix: for fast merge --------- Co-authored-by: Tony Supremacy <165050835+VanStk@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
22 lines
670 B
TypeScript
22 lines
670 B
TypeScript
import type { APIMessageActionRowComponent, ComponentType } from '../types';
|
|
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;
|
|
}
|
|
}
|