2019-09-13 20:02:41 +00:00
|
|
|
const misc = require("../utils/misc.js");
|
|
|
|
|
|
|
|
exports.run = async (message, args) => {
|
2020-03-10 22:24:57 +00:00
|
|
|
if (args.length === 0 || !args[0].match(/^\d+$/)) {
|
|
|
|
return `🎲 The dice landed on ${misc.random([...Array(6).keys()]) + 1}.`;
|
2019-09-13 20:02:41 +00:00
|
|
|
} else {
|
2020-03-10 22:24:57 +00:00
|
|
|
return `🎲 The dice landed on ${misc.random([...Array(parseInt(args[0])).keys()]) + 1}.`;
|
2019-09-13 20:02:41 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.aliases = ["roll", "die", "rng", "random"];
|
2019-12-02 20:47:22 +00:00
|
|
|
exports.category = 4;
|
2019-12-05 16:58:46 +00:00
|
|
|
exports.help = "Rolls the dice";
|
|
|
|
exports.params = "{number}";
|