embeds + decentralized element definition

This commit is contained in:
MapleLeaf
2021-12-25 03:11:01 -06:00
parent 18bcf4828c
commit 6f3c97812c
12 changed files with 231 additions and 116 deletions

View File

@@ -1,4 +1,22 @@
export abstract class Node {
abstract get name(): string
abstract props: Record<string, unknown>
/* eslint-disable class-methods-use-this */
import type { MessageComponentInteraction, MessageOptions } from "discord.js"
export abstract class Node<Props> {
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
}
}