From 6028396e74d39a86518476c9f9ed22229f52be5b Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Sun, 15 Jun 2025 22:20:01 -0400 Subject: [PATCH] chore(bot): update src/util/levelingSystem.ts Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> Signed-off-by: Ahmad <103906421+ahmadk953@users.noreply.github.com> --- src/util/levelingSystem.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/levelingSystem.ts b/src/util/levelingSystem.ts index b311fe6..97744dd 100644 --- a/src/util/levelingSystem.ts +++ b/src/util/levelingSystem.ts @@ -46,7 +46,7 @@ let xpCooldownValue = config.leveling.xpCooldown ?? 60; if (typeof xpCooldownValue === 'string') { xpCooldownValue = Number(xpCooldownValue); } -if (isNaN(xpCooldownValue) || xpCooldownValue < 0) { +if (!Number.isFinite(xpCooldownValue) || xpCooldownValue < 0) { throw new Error('XP cooldown must be a non-negative number.'); }