refactor: interactive button

This commit is contained in:
MapleLeaf
2021-12-25 01:52:55 -06:00
parent 99430e0edc
commit 18bcf4828c
9 changed files with 145 additions and 93 deletions

View File

@@ -3,6 +3,7 @@ import type {
MessageButtonStyle,
MessageComponentInteraction,
} from "discord.js"
import { nanoid } from "nanoid"
import React from "react"
import { Node } from "../node.js"
@@ -22,6 +23,8 @@ export function Button(props: ButtonProps) {
export class ButtonNode extends Node {
readonly name = "button"
readonly customId = nanoid()
constructor(public props: ButtonProps) {
super()
}