From 6b9131c353a578eb3af839a620f7edd9e4072306 Mon Sep 17 00:00:00 2001 From: Usoka <27248545+Usoka@users.noreply.github.com> Date: Thu, 29 Apr 2021 07:03:26 +1200 Subject: [PATCH] Fix 0 not being accepted in SetCounterCmd (#186) --- backend/src/plugins/Counters/commands/SetCounterCmd.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/Counters/commands/SetCounterCmd.ts b/backend/src/plugins/Counters/commands/SetCounterCmd.ts index 0503b2fd..f74c2045 100644 --- a/backend/src/plugins/Counters/commands/SetCounterCmd.ts +++ b/backend/src/plugins/Counters/commands/SetCounterCmd.ts @@ -111,7 +111,7 @@ export const SetCounterCmd = guildCommand()({ } const potentialValue = parseInt(reply.content, 10); - if (!potentialValue) { + if (Number.isNaN(potentialValue)) { sendErrorMessage(pluginData, message.channel, "Not a number, cancelling"); return; }