From 63db6fb27a3e16dcf57ed0ceabe610723cce2cf1 Mon Sep 17 00:00:00 2001 From: fzzinchemical Date: Tue, 15 Apr 2025 06:48:20 +0200 Subject: [PATCH] Refactor interaction handling to remove unused commands and ensure proper command execution for 'gif' --- src/bot.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/bot.ts b/src/bot.ts index 300ca4d..28beb65 100755 --- a/src/bot.ts +++ b/src/bot.ts @@ -34,12 +34,8 @@ client.on(Events.ClientReady, (readyClient) => { client.on(Events.InteractionCreate, async (interaction) => { // messagehandler(interaction.command) if (!interaction.isChatInputCommand()) return; - - if (interaction.commandName === "ping") { - await interaction.reply("pong"); - } - if (interaction.commandName === "pong") { - // if (interaction.options.getString("something something")) + if (interaction.commandName === "gif") { + await commands.execute(interaction) } }); @@ -80,7 +76,7 @@ try { await rest.put( Routes.applicationCommands(client.application.id), { - body: [commands], + body: [commands.data.toJSON()], }, );