diff --git a/commands/Fun/number.js b/commands/Fun/number.js index c4fbca60..99369966 100644 --- a/commands/Fun/number.js +++ b/commands/Fun/number.js @@ -31,7 +31,7 @@ class Number extends BaseCommand { if (currentGames[interaction.guildId]) return interaction.error("fun/number:GAME_RUNNING"); const participants = [], - number = client.functions.randomNum(100, 101); + number = client.functions.randomNum(1000, 5000); await interaction.replyT("fun/number:GAME_START"); diff --git a/helpers/functions.js b/helpers/functions.js index 4941069c..afdf2ebe 100644 --- a/helpers/functions.js +++ b/helpers/functions.js @@ -61,11 +61,11 @@ module.exports = { /** * Generates a random integer between the specified minimum and maximum values (inclusive). * - * @param {number} min - The minimum value (inclusive). - * @param {number} max - The maximum value (inclusive). + * @param {number} [min=0] - The minimum value (inclusive). + * @param {number} [max=100] - The maximum value (inclusive). * @returns {number} A random integer between min and max. */ - randomNum(min, max) { + randomNum(min = 0, max = 100) { min = Math.ceil(min); max = Math.floor(max);