Add extra search params in searchgames command
This commit is contained in:
parent
fb5c3fdddd
commit
3b86e362b5
|
@ -22,7 +22,7 @@ module.exports = {
|
||||||
let description = '';
|
let description = '';
|
||||||
|
|
||||||
for (const game of games) {
|
for (const game of games) {
|
||||||
if (game.first_release_date && (game.category == 0 || game.category == 4)) {
|
if (game.first_release_date && (game.category == 0 || game.category == 4 || game.category == 8 || game.category == 9)) {
|
||||||
const release_date = new Intl.DateTimeFormat('en-GB', { dateStyle: 'long' }).format(game.first_release_date * 1000);
|
const release_date = new Intl.DateTimeFormat('en-GB', { dateStyle: 'long' }).format(game.first_release_date * 1000);
|
||||||
description = description.concat(`- **${game.name}** (*${release_date}*) - ID: ${game.id} \n`);
|
description = description.concat(`- **${game.name}** (*${release_date}*) - ID: ${game.id} \n`);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ async function searchGamesWithMinimumReview(gamename) {
|
||||||
|
|
||||||
async function searchGamesWithoutMinimumReview(gamename) {
|
async function searchGamesWithoutMinimumReview(gamename) {
|
||||||
let body = `search "${gamename}"; `;
|
let body = `search "${gamename}"; `;
|
||||||
body = await body.concat('fields *; limit 25; where (category = 0 | category = 4) & version_parent = null;');
|
body = await body.concat('fields *; limit 25; where (category = 0 | category = 4 | category = 8 | category = 9) & version_parent = null;');
|
||||||
|
|
||||||
const games = await getGameJson(body);
|
const games = await getGameJson(body);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue