From 09d57aef1187789441a1383f2a698f0bf4a53de0 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Fri, 26 Apr 2024 21:45:50 +0500 Subject: [PATCH] remove debug values --- commands/Fun/number.js | 2 +- helpers/functions.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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);