mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
Fix
This commit is contained in:
@@ -59,9 +59,9 @@ module.exports = class SortingHatCommand extends Command {
|
|||||||
for (const [house, amount] of Object.entries(answer.points)) points[house] += amount;
|
for (const [house, amount] of Object.entries(answer.points)) points[house] += amount;
|
||||||
++turn;
|
++turn;
|
||||||
}
|
}
|
||||||
const houseResult = Object.keys(points).sort((a, b) => points[b] - points[a]);
|
const houseResult = Object.keys(points).filter(h => points[h] > 0).sort((a, b) => points[b] - points[a]);
|
||||||
this.playing.delete(msg.channel.id);
|
this.playing.delete(msg.channel.id);
|
||||||
const totalPoints = points.g + points.s + points.h + points.r;
|
const totalPoints = houseResult.reduce((a, b) => a + b, 0);
|
||||||
return msg.say(stripIndents`
|
return msg.say(stripIndents`
|
||||||
You are a member of... **${houses[houseResult[0]]}**!
|
You are a member of... **${houses[houseResult[0]]}**!
|
||||||
_${descriptions[houseResult[0]]}_
|
_${descriptions[houseResult[0]]}_
|
||||||
|
|||||||
Reference in New Issue
Block a user