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>
This commit is contained in:
Ahmad 2025-06-15 22:20:01 -04:00 committed by GitHub
parent ea7b70b3f0
commit 6028396e74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.');
}