UNPKG

@discord-additions/components

Version:

Some helpful additions to make creating components easier.

21 lines (20 loc) 493 B
import type { ComponentTypes } from "../util/Constants"; export declare type ComponentType = typeof ComponentTypes[keyof typeof ComponentTypes]; export default class Component<T extends ComponentType = ComponentType> { type: T; disabled: boolean; constructor(type: T); /** * Disable this component * * @returns {this} */ disable(): this; /** * Enable this component * * @returns {this} */ enable(): this; toJSON(): {}; }