From d3c2c121dc4c7e59524733834be7d000560de54f Mon Sep 17 00:00:00 2001 From: tresabhi Date: Thu, 27 Apr 2023 01:19:31 +0000 Subject: [PATCH] feat: deferred pre-check --- src/utilities/getWargamingResponse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utilities/getWargamingResponse.ts b/src/utilities/getWargamingResponse.ts index 3b3e03674..a2f700bb6 100644 --- a/src/utilities/getWargamingResponse.ts +++ b/src/utilities/getWargamingResponse.ts @@ -8,7 +8,7 @@ export default async function getWargamingResponse( interaction: ChatInputCommandInteraction, callback: (data: Data) => void, ) { - await interaction.deferReply(); + if (!interaction.deferred) await interaction.deferReply(); fetch(url) .then((response) => response.json() as Promise>)