From 477ebbf996521f87228dcfe1ae2bd403e6a352f4 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 3 Jul 2022 12:54:49 +0300 Subject: [PATCH] Try to fix: Interaction has already been acknowled --- discord-bot/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/discord-bot/index.ts b/discord-bot/index.ts index c7b9bf5cb..c7e2ef3c0 100644 --- a/discord-bot/index.ts +++ b/discord-bot/index.ts @@ -27,7 +27,11 @@ client.on("interactionCreate", async (interaction) => { ); } - return command.execute({ interaction, client }).catch(console.error); + try { + await command.execute({ interaction, client }); + } catch (e) { + console.error(e); + } }); client.login(process.env["BOT_TOKEN"]).catch((err) => console.error(err));