From 91d14f00a4c626ae6a904f6ab345dc363ef418b4 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 20 Mar 2024 18:48:42 -0400 Subject: [PATCH] Fix jeopardy --- commands/games-sp/jeopardy.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/commands/games-sp/jeopardy.js b/commands/games-sp/jeopardy.js index ea5ceda6..fa328bb0 100644 --- a/commands/games-sp/jeopardy.js +++ b/commands/games-sp/jeopardy.js @@ -19,7 +19,7 @@ module.exports = class JeopardyCommand extends Command { credit: [ { name: 'jService', - url: 'http://jservice.io/', + url: 'https://jservice.xyz/', reason: 'API' }, { @@ -74,21 +74,7 @@ module.exports = class JeopardyCommand extends Command { } async fetchQuestion() { - const { body } = await request - .get('http://jservice.io/api/random') - .query({ count: 1 }); - const data = body[0]; - if (!data.question || !data.answer) { - await this.markInvalid(data.id); - return this.fetchQuestion(); - } - return data; - } - - async markInvalid(id) { - const { body } = await request - .post('http://jservice.io/api/invalid') - .query({ id }); + const { body } = await request.get('https://jservice.xyz/api/random-clue'); return body; }