From 404fe2bbe87132d99b2b7f507ce587430a0f7452 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:31:11 +1000 Subject: [PATCH] Fix interaction error --- src/commands/mp.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands/mp.ts b/src/commands/mp.ts index 1a58e6d..20531f5 100644 --- a/src/commands/mp.ts +++ b/src/commands/mp.ts @@ -56,7 +56,11 @@ async function fetchData(client:TClient, interaction:Discord.ChatInputCommandInt return data.dss as FSData; } catch { Logger.console('error', 'MPDB', 'Function failed - fetchData'); - await interaction.editReply(`Ran into a ${RanIntoHumor()} while trying to retrieve server data, please try again later.`); + Logger.console('error', 'MPDB', `Interaction data received: ${interaction}`); + + let msg = `Ran into a ${RanIntoHumor()} while trying to retrieve server data, please try again later.`; + if (interaction.replied || interaction.deferred) await interaction.editReply(msg); + else await interaction.reply(msg); } }