From 15b374b44ce477c7c90c9d0c396aa6e01464527d Mon Sep 17 00:00:00 2001 From: lilyissillyyy Date: Thu, 18 Sep 2025 17:30:02 -0400 Subject: [PATCH] Fix --- commands/games-sp/sorting-hat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/games-sp/sorting-hat.js b/commands/games-sp/sorting-hat.js index 53804a46..c7d4a0e9 100644 --- a/commands/games-sp/sorting-hat.js +++ b/commands/games-sp/sorting-hat.js @@ -74,11 +74,12 @@ module.exports = class SortingHatCommand extends Command { } const houseResult = Object.keys(points).filter(h => points[h] > 0).sort((a, b) => points[b] - points[a]); const totalPoints = houseResult.reduce((a, b) => a + points[b], 0); + const lb = houseResult.map(house => `${houses[house]}: ${Math.round((points[house] / totalPoints) * 100)}%`).join('\n'); return msg.say(stripIndents` You are a member of... **${houses[houseResult[0]]}**! _${descriptions[houseResult[0]]}_ - ${houseResult.map(house => `${houses[house]}: ${Math.round((points[house] / totalPoints) * 100)}%`).join('\n')} + ${houseResult[0] === 'b' ? '' : lb} `); } };