From 99a50e4e71a165840f6a2600b54a230a234437cd Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 14 Mar 2021 13:24:10 -0400 Subject: [PATCH] ESRB Exact Search --- commands/search/esrb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/search/esrb.js b/commands/search/esrb.js index 9981345e..a3600d7f 100644 --- a/commands/search/esrb.js +++ b/commands/search/esrb.js @@ -63,6 +63,6 @@ module.exports = class EsrbCommand extends Command { }); const body = JSON.parse(text); if (!body.games.length) return null; - return body.games[0]; + return body.games.find(game => game.title.toLowerCase() === query.toLowerCase()) || body.games[0]; } };