seyfert/src/builders/Base.ts
2024-03-27 23:10:19 -04:00

14 lines
384 B
TypeScript

import type { APIBaseComponent, ComponentType } from 'discord-api-types/v10';
export abstract class BaseComponentBuilder<
TYPE extends Partial<APIBaseComponent<ComponentType>> = APIBaseComponent<ComponentType>,
> {
constructor(public data: Partial<TYPE>) {}
toJSON(): TYPE {
return { ...this.data } as TYPE;
}
}
export type OptionValuesLength = { max: number; min: number };