From eb3a0f84679bbbb097c2f5046b892eb61e7bd9d8 Mon Sep 17 00:00:00 2001 From: Ecolipsy Date: Thu, 2 Dec 2021 16:51:34 +0100 Subject: [PATCH] Debug --- index.js | 4 ++++ 1 file changed, 4 insertions(+) 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); } });