Compare commits

..

No commits in common. "6915843c3aa165f63f8d5120d13f21aee32387cd" and "5cacca37a104d4b2ec586959c96501be353709cd" have entirely different histories.

3 changed files with 4 additions and 16 deletions

View File

@ -6,7 +6,7 @@
"authors": [
{ "name": "Robin Riis" }
],
"version": "0.1.8",
"version": "0.1.7",
"socket": true,
"minimumCoreVersion": 10,
"compatibility": {
@ -32,7 +32,7 @@
]
},
"esmodules": [
"scripts/main.js"
"scripts/puckochat/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,10 +0,0 @@
class PuckoPruttApi {
constructor() {
this.apiUrl = "api.puckoprutt.tech"
this.schema = this.apiUrl + "/schema"
}
dagens_lunch(spider) {
return fetch(this.apiUrl + "/dagens_lunch/" + spider, {method: "GET"});
}
}

View File

@ -1,9 +1,7 @@
import { PuckoPruttApi } from "./puckoapi/puckoapi.js"
import { puckocommand } from "./puckochat/commands.js"
import { puckocommand } from "./commands.js"
Hooks.on("init", async function() {
console.log("[puckoprutt] Hello Init");
var puckoprutt = new PuckoPruttApi();
});
Hooks.on("ready", async function() {
@ -19,7 +17,7 @@ Hooks.on("chatMessage", (log, message, data) => {
if(to_send !== "") {
ChatMessage.create({
user: game.actors.getName("puckoprutt"),
user: game.user.id,
speaker: ChatMessage.getSpeaker({actor: game.actors.getName("puckoprutt"), alias: "Almighty God"}),
content: to_send
});