mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Huge Array Change
This commit is contained in:
@@ -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 ' | '!");
|
||||
|
||||
Reference in New Issue
Block a user