Compare commits
2 Commits
e81668c514
...
b2adab3ec8
Author | SHA1 | Date |
---|---|---|
baz | b2adab3ec8 | |
baz | 00ced7006e |
|
@ -30,9 +30,7 @@ module.exports = {
|
||||||
|
|
||||||
if (!games[0]) return interaction.followUp('No game found.');
|
if (!games[0]) return interaction.followUp('No game found.');
|
||||||
|
|
||||||
await games.sort((a, b) => {
|
await games.sort((a, b) => parseInt(b.total_rating_count) - parseInt(a.total_rating_count));
|
||||||
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];
|
const game = games[0];
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ module.exports = {
|
||||||
const res = await getGameJson(body);
|
const res = await getGameJson(body);
|
||||||
if (!res) return interaction.reply({ content: 'No game found.', ephemeral: true });
|
if (!res) return interaction.reply({ content: 'No game found.', ephemeral: true });
|
||||||
const game = res[0];
|
const game = res[0];
|
||||||
|
|
||||||
const coverUrl = await getCoverURL(game.cover);
|
const coverUrl = await getCoverURL(game.cover);
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
|
|
Loading…
Reference in New Issue