updated to version 0.1.8

This commit is contained in:
KungKurt 2025-02-23 13:58:56 +01:00
parent ba9a3493e8
commit 6915843c3a
2 changed files with 2 additions and 27 deletions

View File

@ -6,7 +6,7 @@
"authors": [
{ "name": "Robin Riis" }
],
"version": "0.1.7",
"version": "0.1.8",
"socket": true,
"minimumCoreVersion": 10,
"compatibility": {
@ -32,7 +32,7 @@
]
},
"esmodules": [
"scripts/puckochat/main.js"
"scripts/main.js"
],
"url": "https://git.puckoprutt.tech/puckoprutt/puckoprutt-foundry-module",
"download": "https://git.puckoprutt.tech/puckoprutt/puckoprutt-foundry-module/archive/main.zip",

View File

@ -1,25 +0,0 @@
import { puckocommand } from "./commands.js"
Hooks.on("init", async function() {
console.log("[puckoprutt] Hello Init");
});
Hooks.on("ready", async function() {
console.log("[puckoprutt] Hello Ready");
});
Hooks.on("chatMessage", (log, message, data) => {
let to_send = "";
let user = game.users.get(data.user);
let world = game.world.id;
if(message[0] === "!") to_send = puckocommand(user, world, log, message.slice(1).split(" "), data);
if(to_send !== "") {
ChatMessage.create({
user: game.user.id,
speaker: ChatMessage.getSpeaker({actor: game.actors.getName("puckoprutt"), alias: "Almighty God"}),
content: to_send
});
}
});