Fix argument-less commands
This commit is contained in:
parent
7e7871cc28
commit
7ff8707520
2
index.js
2
index.js
@ -17,7 +17,7 @@ client.on("message", message => {
|
|||||||
|
|
||||||
if(content.substr(0,1) === "!") {
|
if(content.substr(0,1) === "!") {
|
||||||
let boundary = content.indexOf(' ');
|
let boundary = content.indexOf(' ');
|
||||||
let prefix = content.substr(0, boundary);
|
let prefix = boundary === -1 ? content : content.substr(0, boundary);
|
||||||
|
|
||||||
moduleManager.execute(prefix, message);
|
moduleManager.execute(prefix, message);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user