From 4e7b2537811892ac4d00988fc2382ebd19afa3dd Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 15 Nov 2018 17:48:27 +0000 Subject: [PATCH] Fix --- commands/games/mafia.js | 2 +- commands/games/wizard-convention.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/games/mafia.js b/commands/games/mafia.js index 4beaad2a..892ad060 100644 --- a/commands/games/mafia.js +++ b/commands/games/mafia.js @@ -51,7 +51,7 @@ module.exports = class MafiaCommand extends Command { await player.user.send('Sorry, time is up!'); continue; } - const choice = Number.parseInt(decision.first().content, 10); + const choice = valid[Number.parseInt(decision.first().content, 10)].id; if (player.role === 'mafia') { const chosen = players.get(choice); killed = chosen.id; diff --git a/commands/games/wizard-convention.js b/commands/games/wizard-convention.js index 096e96ae..5b09b1d9 100644 --- a/commands/games/wizard-convention.js +++ b/commands/games/wizard-convention.js @@ -51,7 +51,7 @@ module.exports = class WizardConventionCommand extends Command { await player.user.send('Sorry, time is up!'); continue; } - const choice = Number.parseInt(decision.first().content, 10); + const choice = valid[Number.parseInt(decision.first().content, 10)].id; if (player.role === 'dragon') { const chosen = players.get(choice); eaten = chosen.id;