Skip to content

componentFactory

1
componentFactory(component: APIMessageActionRowComponent): ActionRowMessageComponents | BaseComponent<ActionRowMessageComponents["type"]>

Return a new component instance based on the component type.

Parameters

ParameterTypeDescription
componentAPIMessageActionRowComponentThe component to create.

Returns

ActionRowMessageComponents | BaseComponent<ActionRowMessageComponents["type"]>

The component instance.

Source

seyfert/src/components/index.ts:32