From 4c443fec7c9a3e15dcb162ad89bdfaa445368146 Mon Sep 17 00:00:00 2001 From: Ayden Jahola Date: Mon, 9 Sep 2024 11:35:52 +0100 Subject: [PATCH] trivia: issues with token, remove it for temp fix for now --- commands/games/trivia.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/games/trivia.js b/commands/games/trivia.js index ad16c1d..6b80ca3 100644 --- a/commands/games/trivia.js +++ b/commands/games/trivia.js @@ -88,7 +88,7 @@ const fetchTriviaQuestion = async (categoryId, categoryName) => { if (!triviaQuestion || Date.now() - LAST_API_CALL.time >= API_INTERVAL) { // If no question was found in the database or API cooldown is over, fetch from API const response = await axios.get( - `https://opentdb.com/api.php?amount=1&category=${categoryId}&token=${sessionToken}` + `https://opentdb.com/api.php?amount=1&category=${categoryId}` ); const apiQuestion = response.data.results[0]; @@ -97,7 +97,7 @@ const fetchTriviaQuestion = async (categoryId, categoryName) => { sessionToken = await resetSessionToken(); // Reset session token // Retry fetching the question with the new token const retryResponse = await axios.get( - `https://opentdb.com/api.php?amount=1&category=${categoryId}&token=${sessionToken}` + `https://opentdb.com/api.php?amount=1&category=${categoryId}` ); const retryApiQuestion = retryResponse.data.results[0]; triviaQuestion = await TriviaQuestion.findOne({