Skip to content

Commit

Permalink
fix(bot): determine trophy appearance from player.done, not player.score
Browse files Browse the repository at this point in the history
  • Loading branch information
gabeklavans committed Jun 21, 2024
1 parent 8f7cf30 commit 07bb609
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function updateInlineKeyboard(gameSession: GameSession) {
.slice(0, 8)
.forEach((player, idx) => {
let inlineText = `${player.done ? idx + 1 : ".."}. ${player.name}`;
if (idx === 0 && Object.values(gameSession.players).filter((p) => p.score).length >= 2) {
if (idx === 0 && Object.values(gameSession.players).filter((p) => p.done).length >= 2) {
inlineText += " 🏆";
}
inlineKeyboard.text(inlineText);
Expand Down

0 comments on commit 07bb609

Please sign in to comment.