From f6d82d7af715407bd532489a75d6c266d414cfc0 Mon Sep 17 00:00:00 2001 From: Borys Date: Wed, 13 Mar 2024 13:08:08 +0200 Subject: [PATCH] q fix --- bots/translateBot/api.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bots/translateBot/api.js b/bots/translateBot/api.js index d62d5716..f24492d6 100644 --- a/bots/translateBot/api.js +++ b/bots/translateBot/api.js @@ -186,7 +186,12 @@ export const translateText = async(text) => { } try{ - let detectResponse = await axios.post(`https://translation.googleapis.com/language/translate/v2/detect?key=${API_KEY}`) + let detectResponse = await axios.post( + `https://translation.googleapis.com/language/translate/v2/detect?key=${API_KEY}` + { + q: text + } + ) let lang = ''