From 06fdeaa17ae6ccc1a1e6d8ced3fa3032a47f379c Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 6 Nov 2018 02:01:52 +0000 Subject: [PATCH] Fix --- commands/games/doors.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/games/doors.js b/commands/games/doors.js index efe4ccf2..3a774ccb 100644 --- a/commands/games/doors.js +++ b/commands/games/doors.js @@ -33,14 +33,14 @@ module.exports = class DoorsCommand extends Command { 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)} + ${this.emoji(1, noWin)} ${this.emoji(2, noWin)} ${this.emoji(3, noWin)} `); const stick = await verify(msg.channel, msg.author); if (!stick) door = doors.filter(thisDoor => door !== thisDoor && thisDoor !== noWin)[0]; this.playing.delete(msg.channel.id); return msg.reply(stripIndents` ${door === win ? 'You chose wisely.' : 'Hmm... Try again.'} - ${this.doorEmoji(1, noWin, win)} ${this.doorEmoji(2, noWin, win)} ${this.doorEmoji(3, noWin, win)} + ${this.emoji(1, noWin, win, door)} ${this.emoji(2, noWin, win, door)} ${this.emoji(3, noWin, win, door)} `); } catch (err) { this.playing.delete(msg.channel.id); @@ -48,7 +48,7 @@ module.exports = class DoorsCommand extends Command { } } - doorEmoji(door, noWin, win) { - return door === win ? '💰' : door === noWin ? '🔥' : '🚪'; + emoji(door, noWin, win, chosen) { + return door === win && chosen ? '💰' : door === noWin ? '🔥' : door === chosen ? '🔥' : '🚪'; } };