mirror of
https://github.com/TheShadowEevee/Konpeki-Discord-Bot.git
synced 2025-01-11 14:38:49 -06:00
Fix randomInt() call to randomize to the right number
This commit is contained in:
parent
55f2f8ca02
commit
7a9eb67397
1 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ module.exports = {
|
|||
let rollSum = 0;
|
||||
|
||||
for (let i = 0; i < rollCount; i++) {
|
||||
const randomNum = randomInt(1, dieType);
|
||||
const randomNum = randomInt(1, dieType + 1);
|
||||
|
||||
diceRolls.push(randomNum);
|
||||
rollSum += randomNum;
|
||||
|
@ -92,7 +92,7 @@ module.exports = {
|
|||
const diceRollsString = diceRolls.toString().split(',').join(' + ');
|
||||
|
||||
for (let i = 0; i < rollCount; i++) {
|
||||
diceRolls.push(randomInt(1, dieType));
|
||||
diceRolls.push(randomInt(1, dieType + 1));
|
||||
}
|
||||
|
||||
await interaction.reply({ content: `\`${rollCount}d${dieType}${rollModNota}\`\n\`Rolls: ( ${diceRollsString} )${rollModStr} = ${rollSum + rollMod}\``, ephemeral: (isEphemeral === 'true') });
|
||||
|
|
Loading…
Reference in a new issue