mirror of
https://github.com/aydenjahola/discord-multipurpose-bot.git
synced 2024-11-22 08:45:55 +00:00
trivia: issues with token, remove it for temp fix for now
This commit is contained in:
parent
1a3599d8b0
commit
4c443fec7c
1 changed files with 2 additions and 2 deletions
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue