Merge pull request #75 from jacobrosenthal/errorcodes

Add error codes for invalid or unknown commands
This commit is contained in:
Jordi Baylina 2020-12-31 06:38:55 +01:00 committed by GitHub
commit 760c409b19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,12 +54,14 @@ export default async function clProcessor(commands) {
} else {
if (m.length>0) console.log("Invalid number of parameters");
helpCmd(cmd);
return 99;
}
return;
}
}
if (cl.length>0) console.log("Invalid command");
helpAll();
return 99;
function calculateMatch(cmd, cl) {
const alias = [];