refactor: rendering button

This commit is contained in:
MapleLeaf
2021-12-25 01:24:52 -06:00
parent e799e71f1a
commit 99430e0edc
9 changed files with 107 additions and 31 deletions

View File

@@ -1,7 +1,9 @@
import { Client } from "discord.js"
import "dotenv/config"
import React from "react"
import { InstanceManager } from "../src.new/main.js"
import { createCommandHandler } from "./command-handler.js"
import { Counter } from "./counter.js"
const client = new Client({
intents: ["GUILDS"],
@@ -14,7 +16,7 @@ createCommandHandler(client, [
name: "counter",
description: "shows a counter button",
run: (interaction) => {
manager.create(interaction).render("hi world")
manager.create(interaction).render(<Counter />)
},
},
])