mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Test
This commit is contained in:
@@ -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)}.`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user