From 0cad89f23245c492e8b827fcf436530eaec32c8a Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Mon, 11 Mar 2019 17:18:46 +0000 Subject: [PATCH] Fix --- commands/games/sorting-hat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/games/sorting-hat.js b/commands/games/sorting-hat.js index ad9cedb0..fadff0a9 100644 --- a/commands/games/sorting-hat.js +++ b/commands/games/sorting-hat.js @@ -61,7 +61,7 @@ module.exports = class SortingHatCommand extends Command { } const houseResult = Object.keys(points).filter(h => points[h] > 0).sort((a, b) => points[b] - points[a]); this.playing.delete(msg.channel.id); - const totalPoints = houseResult.reduce((a, b) => a + b, 0); + const totalPoints = houseResult.reduce((a, b) => a + points[b], 0); return msg.say(stripIndents` You are a member of... **${houses[houseResult[0]]}**! _${descriptions[houseResult[0]]}_