From a85d6ad93ac1ab83ef4233929a6db02289b3ea75 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 6 Nov 2018 01:51:32 +0000 Subject: [PATCH] Fix --- commands/games/doors.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/commands/games/doors.js b/commands/games/doors.js index 70f689a1..efe4ccf2 100644 --- a/commands/games/doors.js +++ b/commands/games/doors.js @@ -30,8 +30,7 @@ module.exports = class DoorsCommand extends Command { this.playing.add(msg.channel.id); try { const win = doors[Math.floor(Math.random() * doors.length)]; - const doorNoWin = doors.filter(thisDoor => thisDoor !== win); - const noWin = doorNoWin[Math.floor(Math.random() * doorNoWin.length)]; + const noWin = doors.filter(thisDoor => thisDoor !== win && door !== thisDoor)[0]; await msg.reply(stripIndents` Well, there's nothing behind door number **${noWin}**. Do you want to stick with door ${door}? ${this.doorEmoji(1, noWin)} ${this.doorEmoji(2, noWin)} ${this.doorEmoji(3, noWin)}