3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 16:25:03 +00:00

BugFix Correct NaN check in setcounter

Use isNaN check so 0 can be accepted but still restrict to only numbers
This commit is contained in:
Usoka 2021-04-16 10:59:11 +12:00 committed by GitHub
parent c26ab2977f
commit 694d14d43a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,7 +111,7 @@ export const SetCounterCmd = guildCommand<CountersPluginType>()({
}
const potentialValue = parseInt(reply.content, 10);
if (!potentialValue) {
if (isNaN(potentialValue)) {
sendErrorMessage(pluginData, message.channel, "Not a number, cancelling");
return;
}