mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 15:58:06 +02:00
The Power of const
This commit is contained in:
@@ -31,7 +31,6 @@ module.exports = class ChooseCommand extends commando.Command {
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let choices = args.choices;
|
||||
if (!choices.includes(' | ')) return message.say(':x: Error! Split your messages with a " | "!');
|
||||
choices = choices.split(" | ");
|
||||
choices = choices[Math.floor(Math.random() * choices.length)];
|
||||
return message.say(`I choose ${choices}!`);
|
||||
|
||||
Reference in New Issue
Block a user