diff --git a/scripts/puckochat/commands.js b/scripts/puckochat/commands.js index 7abc4d1..59b5e3e 100644 --- a/scripts/puckochat/commands.js +++ b/scripts/puckochat/commands.js @@ -2,7 +2,7 @@ function test(user) { return `hello ${user}`; } -export function command(isGM, user, world, log, message, data) { +export function puckocommand(isGM, user, world, log, message, data) { console.log(`isGM: ${isGM}`); console.log(`user: ${user}`); console.log(`world: ${world}`); @@ -10,4 +10,5 @@ export function command(isGM, user, world, log, message, data) { console.log(`message: ${message}`); console.log(`data: ${data}`); if(message[0] === "test") return test(user); + return "" } \ No newline at end of file diff --git a/scripts/puckochat/main.js b/scripts/puckochat/main.js index 46343fb..506c1e7 100644 --- a/scripts/puckochat/main.js +++ b/scripts/puckochat/main.js @@ -10,7 +10,7 @@ Hooks.on("ready", function() { Hooks.on("chatMessage", (log, message, data) => { to_send = ""; - if(message[0] === "!") to_send = commands.command(log, message.slice(1).split(" "), data); + if(message[0] === "!") to_send = commands.puckocommand(log, message.slice(1).split(" "), data); if(to_send !== "") { ChatMessage.create({