Compare commits

..

1 Commits

Author SHA1 Message Date
baz e81668c514 Add RecentBeat command 2023-12-27 20:43:40 +00:00
2 changed files with 3 additions and 2 deletions

View File

@ -30,7 +30,9 @@ module.exports = {
if (!games[0]) return interaction.followUp('No game found.');
await games.sort((a, b) => parseInt(b.total_rating_count) - parseInt(a.total_rating_count));
await games.sort((a, b) => {
return (a.total_rating_count == null) - (b.total_rating_count == null) || +(a.total_rating_count > b.total_rating_count) || -(a.total_rating_count < b.total_rating_count);
});
const game = games[0];

View File

@ -25,7 +25,6 @@ module.exports = {
const res = await getGameJson(body);
if (!res) return interaction.reply({ content: 'No game found.', ephemeral: true });
const game = res[0];
const coverUrl = await getCoverURL(game.cover);
const embed = new EmbedBuilder()