UNPKG

@oceanicjs/builders

Version:

Helpful builders for various Discord related things.

34 lines (28 loc) 590 B
import type { ComponentTypes } from "oceanic.js"; export default class Component<T extends ComponentTypes = ComponentTypes> { disabled = false; type: T; constructor(type: T) { this.type = type; } /** * Disable this component. */ disable(): this { this.disabled = true; return this; } /** * Enable this component. */ enable(): this { this.disabled = false; return this; } toJSON(): unknown { return {}; } toJSONRaw(): unknown { return this.toJSON(); } }