mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
25 lines
503 B
JavaScript
25 lines
503 B
JavaScript
const Command = require('../../framework/Command');
|
|
|
|
module.exports = class ChooseCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'choose',
|
|
aliases: ['pick'],
|
|
group: 'random-res',
|
|
description: 'Chooses between options you provide.',
|
|
args: [
|
|
{
|
|
key: 'choices',
|
|
type: 'string',
|
|
infinite: true,
|
|
max: 1950
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
run(msg, { choices }) {
|
|
return msg.say(`I choose ${choices[Math.floor(Math.random() * choices.length)]}!`);
|
|
}
|
|
};
|