mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 10:25:11 +02:00
Fix
This commit is contained in:
@@ -76,7 +76,7 @@ module.exports = class HorseRaceCommand extends Command {
|
|||||||
time: randomRange(horse.minTime, horse.minTime + 15) + Math.random()
|
time: randomRange(horse.minTime, horse.minTime + 15) + Math.random()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
results = results.sort((a, b) => b.time - a.time);
|
results = results.sort((a, b) => a.time - b.time);
|
||||||
const leaderboard = await this.generateLeaderboard(chosenHorses, results);
|
const leaderboard = await this.generateLeaderboard(chosenHorses, results);
|
||||||
const win = results[0].name === pick.name;
|
const win = results[0].name === pick.name;
|
||||||
return msg.reply(win ? `Nice job! Your horse won!` : 'Better luck next time!', { files: [leaderboard] });
|
return msg.reply(win ? `Nice job! Your horse won!` : 'Better luck next time!', { files: [leaderboard] });
|
||||||
|
|||||||
Reference in New Issue
Block a user