mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +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()
|
||||
});
|
||||
}
|
||||
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 win = results[0].name === pick.name;
|
||||
return msg.reply(win ? `Nice job! Your horse won!` : 'Better luck next time!', { files: [leaderboard] });
|
||||
|
||||
Reference in New Issue
Block a user