diff --git a/index.js b/index.js index 1645d19..250628f 100644 --- a/index.js +++ b/index.js @@ -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); }