Compare commits
No commits in common. "6915843c3aa165f63f8d5120d13f21aee32387cd" and "5cacca37a104d4b2ec586959c96501be353709cd" have entirely different histories.
6915843c3a
...
5cacca37a1
@ -6,7 +6,7 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{ "name": "Robin Riis" }
|
{ "name": "Robin Riis" }
|
||||||
],
|
],
|
||||||
"version": "0.1.8",
|
"version": "0.1.7",
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"minimumCoreVersion": 10,
|
"minimumCoreVersion": 10,
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
@ -32,7 +32,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"esmodules": [
|
"esmodules": [
|
||||||
"scripts/main.js"
|
"scripts/puckochat/main.js"
|
||||||
],
|
],
|
||||||
"url": "https://git.puckoprutt.tech/puckoprutt/puckoprutt-foundry-module",
|
"url": "https://git.puckoprutt.tech/puckoprutt/puckoprutt-foundry-module",
|
||||||
"download": "https://git.puckoprutt.tech/puckoprutt/puckoprutt-foundry-module/archive/main.zip",
|
"download": "https://git.puckoprutt.tech/puckoprutt/puckoprutt-foundry-module/archive/main.zip",
|
||||||
|
|||||||
@ -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"});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +1,7 @@
|
|||||||
import { PuckoPruttApi } from "./puckoapi/puckoapi.js"
|
import { puckocommand } from "./commands.js"
|
||||||
import { puckocommand } from "./puckochat/commands.js"
|
|
||||||
|
|
||||||
Hooks.on("init", async function() {
|
Hooks.on("init", async function() {
|
||||||
console.log("[puckoprutt] Hello Init");
|
console.log("[puckoprutt] Hello Init");
|
||||||
var puckoprutt = new PuckoPruttApi();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Hooks.on("ready", async function() {
|
Hooks.on("ready", async function() {
|
||||||
@ -19,7 +17,7 @@ Hooks.on("chatMessage", (log, message, data) => {
|
|||||||
|
|
||||||
if(to_send !== "") {
|
if(to_send !== "") {
|
||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
user: game.actors.getName("puckoprutt"),
|
user: game.user.id,
|
||||||
speaker: ChatMessage.getSpeaker({actor: game.actors.getName("puckoprutt"), alias: "Almighty God"}),
|
speaker: ChatMessage.getSpeaker({actor: game.actors.getName("puckoprutt"), alias: "Almighty God"}),
|
||||||
content: to_send
|
content: to_send
|
||||||
});
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user