This commit is contained in:
Dragon Fire
2024-03-21 23:15:00 -04:00
parent 175eba1732
commit 00ea78ddb4
+4
View File
@@ -33,9 +33,13 @@ module.exports = class RollCommand extends Command {
}
run(msg, { maxValue, minValue }) {
console.log(maxValue);
console.log(minValue);
let result;
if (minValue) result = randomRange(minValue, maxValue);
else result = Math.floor(Math.random() * maxValue) + 1;
console.log(result);
console.log(formatNumber(result));
return msg.say(`You rolled a ${formatNumber(result)}.`);
}
};