mirror of
https://github.com/ahmadk953/poixpixel-discord-bot.git
synced 2025-06-22 14:14:20 +00:00
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:
parent
ea7b70b3f0
commit
6028396e74
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ let xpCooldownValue = config.leveling.xpCooldown ?? 60;
|
||||||
if (typeof xpCooldownValue === 'string') {
|
if (typeof xpCooldownValue === 'string') {
|
||||||
xpCooldownValue = Number(xpCooldownValue);
|
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.');
|
throw new Error('XP cooldown must be a non-negative number.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue