Fix argument-less commands

This commit is contained in:
Tanguy Herbron 2021-05-09 01:40:30 +02:00
parent 7e7871cc28
commit 7ff8707520

View File

@ -17,7 +17,7 @@ client.on("message", message => {
if(content.substr(0,1) === "!") {
let boundary = content.indexOf(' ');
let prefix = content.substr(0, boundary);
let prefix = boundary === -1 ? content : content.substr(0, boundary);
moduleManager.execute(prefix, message);
}