1const res = await fetch("https://charmaine--f63947e4efa911efbe7fe6cdfca9ef9f.web.val.run/", {
2 method: "POST",
3 body: JSON.stringify({ args: [2, 3] }),
5async function servePublicFile(path: string): Promise<Response> {
6 const url = new URL("./public/" + path, import.meta.url);
7 const text = await (await fetch(url, {
8 headers: {
9 "User-Agent": "", // to transpile TS to JS
181
182 try {
183 const response = await fetch("/", {
184 method: "POST",
185 body: JSON.stringify({
116
117async function sendMessage(content: string) {
118 await fetch(DISCORD_WEBHOOK_URL, {
119 method: "POST",
120 headers: { "Content-Type": "application/json" },
525 const characterClass = prompt('Enter character class:');
526 if (name && characterClass) {
527 const response = await fetch('', {
528 method: 'POST',
529 headers: { 'Content-Type': 'application/json' },
537
538 document.getElementById('simulate').addEventListener('click', async () => {
539 const response = await fetch('', {
540 method: 'POST',
541 headers: { 'Content-Type': 'application/json' },
550
551 async function loadCharacters() {
552 const response = await fetch('/characters');
553 const characters = await response.json();
554 const charactersList = document.getElementById('characters-list');
562
563 async function loadQuests() {
564 const response = await fetch('/quests');
565 const quests = await response.json();
566 const questsList = document.getElementById('quests-list');
10 setIsAnalyzing(true);
11 try {
12 const response = await fetch('/api/analyze', {
13 method: 'POST',
14 headers: {
1import { fetch } from "https://esm.town/v/std/fetch";
2import { getDayName } from "https://esm.town/v/stevekrouse/getDayName?v=2";
3import process from "node:process";
4
5export const dailySlackRoundup = async () => {
6 const res = await fetch(process.env.BRAINBOT_WEBHOOK_URL, {
7 method: "POST",
8 body: JSON.stringify({
5async function servePublicFile(path: string): Promise<Response> {
6 const url = new URL("./public/" + path, import.meta.url);
7 const text = await (await fetch(url, {
8 headers: {
9 "User-Agent": "", // to transpile TS to JS
181
182 try {
183 const response = await fetch("/", {
184 method: "POST",
185 body: JSON.stringify({
44
45 try {
46 const response = await fetch("/generate", {
47 method: "POST",
48 headers: {
68
69 try {
70 const response = await fetch("/generate", {
71 method: "POST",
72 headers: {
96 setIsLoading(true);
97 try {
98 const response = await fetch("/generate-share", {
99 method: "POST",
100 headers: {
94
95 useEffect(() => {
96 async function fetchTemperatures() {
97 try {
98 const response = await fetch("/temperatures");
99 if (!response.ok) {
100 throw new Error(`HTTP error! status: ${response.status}`);
123 }
124 } catch (error) {
125 console.error("Failed to fetch temperatures:", error);
126 setError(error);
127 }
128 }
129
130 fetchTemperatures();
131 const interval = setInterval(fetchTemperatures, 60000);
132 return () => clearInterval(interval);
133 }, []);
348 }
349
350 // Fetch temperatures for dashboard
351 if (request.method === "GET" && new URL(request.url).pathname === "/temperatures") {
352 const result = await sqlite.execute(`