Files
xiao/commands/random-res/choose.js
T
Daniel Odendahl Jr fd4e35533a 23
2017-06-17 03:26:31 +00:00

27 lines
772 B
JavaScript

const Command = require('../../structures/Command');
module.exports = class ChooseCommand extends Command {
constructor(client) {
super(client, {
name: 'choose',
group: 'random-res',
memberName: 'choose',
description: 'Chooses between options you provide.',
args: [
{
key: 'choices',
prompt: 'What choices do you want me pick from?',
type: 'string',
infinite: true
}
]
});
}
run(msg, args) {
const { choices } = args;
const choice = choices[Math.floor(Math.random() * choices.length)];
return msg.say(`I choose ${choice}!`);
}
};