mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
27 lines
592 B
JavaScript
27 lines
592 B
JavaScript
const Command = require('../../structures/Command');
|
|
|
|
module.exports = class RollCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'roll',
|
|
aliases: ['dice'],
|
|
group: 'random',
|
|
memberName: 'roll',
|
|
description: 'Rolls a dice with a maximum value of your choice.',
|
|
args: [
|
|
{
|
|
key: 'value',
|
|
label: 'maximum number',
|
|
prompt: 'What is the maximum number you wish to appear?',
|
|
type: 'integer',
|
|
default: 6
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
run(msg, { value }) {
|
|
return msg.say(`You rolled a ${Math.floor(Math.random() * value) + 1}.`);
|
|
}
|
|
};
|