mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 22:32:50 +02:00
fix
This commit is contained in:
@@ -11,7 +11,8 @@ module.exports = class SortingHatQuizCommand extends Command {
|
|||||||
aliases: ['sorting-hat', 'pottermore', 'hogwarts'],
|
aliases: ['sorting-hat', 'pottermore', 'hogwarts'],
|
||||||
group: 'games',
|
group: 'games',
|
||||||
memberName: 'sorting-hat-quiz',
|
memberName: 'sorting-hat-quiz',
|
||||||
description: 'Take a quiz to determine your Hogwarts house.'
|
description: 'Take a quiz to determine your Hogwarts house.',
|
||||||
|
details: '**Source**: <https://www.reddit.com/r/Pottermore/comments/44os14/pottermore_sorting_hat_quiz_analysis/>'
|
||||||
});
|
});
|
||||||
|
|
||||||
this.playing = new Set();
|
this.playing = new Set();
|
||||||
@@ -59,7 +60,7 @@ module.exports = class SortingHatQuizCommand 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 house = Object.keys(points).sort((a, b) => points[a] - points[b])[0];
|
const house = Object.keys(points).sort((a, b) => points[b] - points[a])[0];
|
||||||
this.playing.delete(msg.channel.id);
|
this.playing.delete(msg.channel.id);
|
||||||
return msg.say(stripIndents`
|
return msg.say(stripIndents`
|
||||||
You are a member of... **${houses[house]}**!
|
You are a member of... **${houses[house]}**!
|
||||||
|
|||||||
Reference in New Issue
Block a user