From 26621c98664ce06fe02134766bc7752229ed8de8 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Sat, 22 Apr 2023 23:11:37 +0200 Subject: [PATCH] modal patch to interactionCreate --- events/interactionCreate.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/events/interactionCreate.js b/events/interactionCreate.js index 19e5a41..62c3e50 100644 --- a/events/interactionCreate.js +++ b/events/interactionCreate.js @@ -48,6 +48,10 @@ client.on("interactionCreate", async (interaction) => { let dataToProcess = JSON.stringify(commandData[0]) let parsedData = JSON.parse(dataToProcess) + + if (interaction.commandName == "modal-example"){ + console.log("Modal - Skipping defer") + } else { // If the command is private, set ephemeral true else, set false console.log(parsedData) if (parsedData.private == true) { @@ -60,8 +64,7 @@ client.on("interactionCreate", async (interaction) => { ephemeral: false }).catch(() => {}); } - - + } const cmd = client.slashCommands.get(interaction.commandName); if (!cmd) return interaction.followUp({