ESRB Exact Search

This commit is contained in:
Dragon Fire
2021-03-14 13:24:10 -04:00
parent 2723c307ae
commit 99a50e4e71
+1 -1
View File
@@ -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];
}
};