mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
25 lines
714 B
JavaScript
25 lines
714 B
JavaScript
const { Command } = require('discord.js-commando');
|
|
|
|
module.exports = class ChooseCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'choose',
|
|
group: 'response',
|
|
memberName: 'choose',
|
|
description: 'Chooses between things.',
|
|
args: [{
|
|
key: 'choices',
|
|
prompt: 'What choices do you want me pick from?',
|
|
type: 'string',
|
|
infinite: true
|
|
}]
|
|
});
|
|
}
|
|
|
|
run(message, args) {
|
|
const { choices } = args;
|
|
const choice = choices[Math.floor(Math.random() * choices.length)];
|
|
return message.say(`I choose ${choice}!`);
|
|
}
|
|
};
|