mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 14:04:38 +02:00
23
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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}!`);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user