15 bgColor?: string;
16 font?: string;
17 api_base?: string;
18}
19
25 bgColor,
26 font,
27 api_base,
28}: MicroReactProps) {
29 const baseUrl = "https://microreact.glitch.me/embed/index.html";
37 if (bgColor) params.append("bgColor", encodeURIComponent(bgColor));
38 if (font) params.append("font", encodeURIComponent(font));
39 if (api_base) params.append("api_base", api_base);
40
41 const iframeSrc = `${baseUrl}?${params.toString()}`;
9 // Verify this webhook came from our bot
10 if (
11 req.headers.get("x-telegram-bot-api-secret-token")
12 !== Deno.env.get("telegramWebhookSecret")
13 ) {
30 try {
31 const r = await fetch(
32 "https://fonts.googleapis.com/css2?family=" +
33 encodeURIComponent("IBM Plex Sans:wght@600") +
34 "&text=" +
2import { blob } from "https://esm.town/v/std/blob";
3// Bump version
4import { Routes } from "https://deno.land/x/discord_api_types@0.37.99/v9.ts";
5import { REST } from "npm:@discordjs/rest";
6import { createAudioPlayer, createAudioResource, joinVoiceChannel } from "npm:@discordjs/voice";
7import googleTTS from "npm:google-tts-api";
8let bank = await blob.getJSON("bank");
9let bets = await blob.getJSON("bets");
1# trpc
2
3 Access private Val Town apis.
4
5> ⚠️ trpc endpoints can change at any time
1const baseURL = `https://www.val.town/api/trpc`;
2
3export const trpc = {
62 );
63});
64app.get("/api/episodes/:slug", async (c) => {
65 const { slug } = c.req.param();
66 const episodes = await episodeHandler(slug);
127 <title>${mediaId}</title>
128 <style>
129 @import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;700&display=swap');
130
131 html,
1# trpc
2
3 Access private Val Town apis.
4
5> ⚠️ trpc endpoints can change at any time
1const baseURL = `https://www.val.town/api/trpc`;
2
3export const trpc = {
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12