From ef9c9468f28759eb52a7b41edd4937ce50135283 Mon Sep 17 00:00:00 2001 From: cirroskais Date: Thu, 18 Apr 2024 15:05:16 -0400 Subject: [PATCH] text response for default --- src/interactions/default.ts | 38 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/src/interactions/default.ts b/src/interactions/default.ts index cfb2550..2c2b04c 100644 --- a/src/interactions/default.ts +++ b/src/interactions/default.ts @@ -1,40 +1,28 @@ import type { Command } from "../lib/types/command"; -import { MessageComponentTypes, TextStyles } from "@discordeno/bot"; +import { + MessageComponentTypes, + TextStyles, + type Interaction, + type InteractionResponse, + InteractionResponseTypes, +} from "@discordeno/bot"; import SlashCommand from "../lib/classes/SlashCommand"; import Modal from "../lib/classes/Modal"; import { collectModal } from "../lib/handlers/ModalHandler"; export default class extends SlashCommand implements Command { name = "default"; - description = "Show a test modal"; + description = "default"; options = []; constructor() { super(); } - async run() { - const modal = new Modal().setTitle("dope").setComponents([ - { - type: MessageComponentTypes.ActionRow, - components: [ - { - type: MessageComponentTypes.InputText, - customId: "default", - style: TextStyles.Short, - label: "default", - }, - ], - }, - ]); - - collectModal(modal) - .then(({ interaction, values }) => { - if (!interaction.data?.components) return; - interaction.respond("default: " + values.get("default")); - }) - .catch((_) => {}); - - return modal; + async run(interaction: Interaction) { + return { + type: InteractionResponseTypes.UpdateMessage, + data: { content: "my name is terry and im going to destroy thgis world" }, + }; } }