Horse Race Command

This commit is contained in:
Dragon Fire
2020-04-21 18:49:41 -04:00
parent 3145267427
commit 4bedbcda74
14 changed files with 309 additions and 10 deletions
+2 -2
View File
@@ -34,8 +34,8 @@ module.exports = class RollCommand extends Command {
run(msg, { maxValue, minValue }) {
let result;
if (!minValue) result = Math.floor(Math.random() * maxValue) + 1;
else result = randomRange(minValue, maxValue);
if (minValue) result = randomRange(minValue, maxValue);
else result = Math.floor(Math.random() * maxValue) + 1;
return msg.say(`You rolled a ${formatNumber(result)}.`);
}
};