From 056702025d522760e7fa6637b33110c193d8e1d2 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Fri, 3 Aug 2018 18:36:31 -0400 Subject: [PATCH] Fix --- commands/games/box-choosing.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/commands/games/box-choosing.js b/commands/games/box-choosing.js index 9a5a2e19..271163f4 100644 --- a/commands/games/box-choosing.js +++ b/commands/games/box-choosing.js @@ -44,14 +44,14 @@ module.exports = class BoxChoosingCommand extends Command { }); if (!choose.size) break; path = ''; - if (this.red.has(msg.author.id) && this.blue.has(msg.author.id)) { + const pick = line.paths[line.options.indexOf(choose.first().content.toLowerCase())]; + if ((this.red.has(msg.author.id) && pick !== 'red') || (this.blue.has(msg.author.id) && pick !== 'blue')) { path += 'both'; - this.red.delete(msg.author.id); - this.blue.delete(msg.author.id); + if (this.red.has(msg.author.id)) this.red.delete(msg.author.id); + if (this.blue.has(msg.author.id)) this.blue.delete(msg.author.id); } else { - const choice = line.paths[line.options.indexOf(choose.first().content.toLowerCase())]; - path += choice; - this[choice].add(msg.author.id); + path += pick; + this[pick].add(msg.author.id); } i = 0; } else {