mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
27 lines
579 B
JavaScript
27 lines
579 B
JavaScript
const { Command } = require('discord.js-commando');
|
|
|
|
module.exports = class ChooseCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'choose',
|
|
aliases: ['pick'],
|
|
group: 'random',
|
|
memberName: 'choose',
|
|
description: 'Chooses between options you provide.',
|
|
args: [
|
|
{
|
|
key: 'choices',
|
|
prompt: 'What choices do you want me pick from?',
|
|
type: 'string',
|
|
infinite: true,
|
|
max: 1950
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
run(msg, { choices }) {
|
|
return msg.say(`I choose ${choices[Math.floor(Math.random() * choices.length)]}!`);
|
|
}
|
|
};
|