Debug
This commit is contained in:
parent
f247f3b2de
commit
eb3a0f8467
1 changed files with 4 additions and 0 deletions
4
index.js
4
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);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue