From 33b0ffa244eaa33a75f16790678390aad8f3d3ff Mon Sep 17 00:00:00 2001 From: Thongrapee Panyapatiphan Date: Fri, 1 Oct 2021 23:59:33 +0700 Subject: [PATCH] Update parsing and validation logic for playlist-limit config --- src/commands/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/config.ts b/src/commands/config.ts index 13186fc..cb3fc74 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -76,8 +76,8 @@ export default class implements Command { } case 'playlist-limit': { - const playlistLimit = Number(args[1]); - if (!playlistLimit || playlistLimit <= 0) { + const playlistLimit = parseInt(args[1], 10); + if (playlistLimit <= 0) { await msg.channel.send(errorMsg('please enter a valid number')); return; }