diff --git a/index.js b/index.js index 518c318..a5f3c96 100644 --- a/index.js +++ b/index.js @@ -161,11 +161,15 @@ client.on("messageCreate", (msg) => { msg.channel.send(e.stack).catch(e => {msg.channel.send("Well thats ironic, an error for an error message: \n" + e.stack)}); } } else if(msg.content.startsWith("rps!ju")){ + console.log("Was rps!ju"); var commands = parseCommands(); commands.forEach(cmd => { + console.log("Command: " + cmd.name); if(msg.content.startsWith("rps!ju " + cmd.name)){ + console.log("Was " + cmd.name); msg.content = msg.content.replace("rps!ju " + cmd.name, "ju!" + cmd.name); const args = msg.content.slice("ju!".length).trim().split(/ +/); + console.log("Content: %s, args: %s", msg.content, args); cmd.execute(msg, args); } });