mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Shuffle Falsey check
This commit is contained in:
@@ -28,7 +28,12 @@ class ShuffleCommand extends commando.Command {
|
||||
}
|
||||
return a.join("");
|
||||
}
|
||||
message.channel.sendMessage(message.content.split(" ").slice(1).join(" ").shuffle());
|
||||
let shuffled = message.content.split(" ").slice(1).join(" ");
|
||||
if(shuffled === '') {
|
||||
message.channel.sendMessage(":x: Error! Nothing to shuffle!");
|
||||
} else {
|
||||
message.channel.sendMessage(shuffled.shuffle());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user