1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramSendPhoto = async (botToken: string, options: TelegramSendPhotoOptions) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/sendPhoto`,
6 {
35
36async function postJson(url, body?) {
37 return await fetch(url, {
38 method: "POST",
39 headers: { "Content-Type": "application/json" },
298 return c.json("success");
299});
300export default app.fetch;
2import { Hono } from "npm:hono@3";
3
4// TODO: Fetch from key-value
5const profile = {
6 displayName: "Jordan",
169app.get("/", (c) => c.html(myspaceHtml(profile)));
170
171export default app.fetch;
23});
24
25export default app.fetch;
1import { discordFetch } from "https://esm.town/v/vtdocs/discordFetch?v=10";
2
3const recipientId = "420257368417239041";
6const botToken = Deno.env.get("discordBot");
7
8const DM = await discordFetch(
9 botToken,
10 "/users/@me/channels",
16console.log(DM);
17// Then, we send a message via the DM
18const result = await discordFetch(
19 botToken,
20 `/channels/${DM.id}/messages`,
78});
79
80export default app.fetch;
2import { blob } from "https://esm.town/v/std/blob?v=11";
3import { email } from "https://esm.town/v/std/email?v=11";
4import { fetch } from "https://esm.town/v/std/fetch";
5
6export const watchWebsite = async () => {
7 const url = "https://transformer-circuits.pub";
8 const newHtml = await fetch(url).then(r => r.text());
9
10 const key = "watch:" + url;
4 formData.append("file", file);
5
6 const response = await fetch("https://file.io", {
7 method: "POST",
8 body: formData,
4 formData.append("file", blob, name);
5 formData.append("expires", "1");
6 const response = await fetch("https://0x0.st", {
7 method: "POST",
8 body: formData,