Files
reacord/src.new/node.ts
2021-12-25 03:55:04 -06:00

25 lines
578 B
TypeScript

/* eslint-disable class-methods-use-this */
import type { MessageComponentInteraction, MessageOptions } from "discord.js"
import { Container } from "./container.js"
export abstract class Node<Props> {
readonly children = new Container<Node<unknown>>()
protected props: Props
constructor(initialProps: Props) {
this.props = initialProps
}
setProps(props: Props) {
this.props = props
}
modifyMessageOptions(options: MessageOptions) {}
handleInteraction(
interaction: MessageComponentInteraction,
): true | undefined {
return undefined
}
}