Huge Array Change

This commit is contained in:
dragonfire535
2017-03-13 21:59:25 -04:00
parent b3d61772e6
commit 46f9e8e639
20 changed files with 73 additions and 23 deletions
+2 -1
View File
@@ -20,7 +20,8 @@ class ChooseCommand extends commando.Command {
if(message.content.includes("|")) {
let choice2 = message.content.split("|").slice(1).join(" ");
let choice1 = " " + message.content.replace(choice2, "").split(" ").slice(1).join(" ");
let coin = [choice1, choice2][Math.floor(Math.random() * 2)];
let coin = [choice1, choice2];
coin = coin[Math.floor(Math.random() * coin.length)];
message.channel.sendMessage("I choose" + coin.replace("|", ""));
} else {
message.channel.sendMessage(":x: Split your two choices with a ' | '!");