This commit is contained in:
Daniel Odendahl Jr
2017-11-09 00:02:59 +00:00
parent 819db49057
commit b6afded306
125 changed files with 743 additions and 289 deletions
+26
View File
@@ -0,0 +1,26 @@
const { Command } = require('discord.js-commando');
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}.`);
}
};