This commit is contained in:
Ecolipsy 2021-12-02 16:51:34 +01:00
parent f247f3b2de
commit eb3a0f8467

View file

@ -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);
}
});