6import { telegramSendMessage } from "https://esm.town/v/vtdocs/telegramSendMessage?v=5";
7
8export default async function server(req: Request): Promise<Response> {
9 // Verify this webhook came from our bot
10 if (
22 let chat = telegramValTownBotSecrets.find((c) => c.chatId === chatId);
23
24 // Helper function to message back the user that triggered this webhook
25 let messageBack = (message) =>
26 telegramSendMessage(Deno.env.get("telegramBot"), {
10- Shows both the parsed date and the original input text
11- Clean, minimalist UI with a clear input field
12- One-click clear functionality
13
14## How It Works
34
35- Modify the Tailwind CSS classes in the HTML to change the styling
36- Adjust the date formatting in the `formatDate` function
37- Change the parsing behavior by modifying the `detectDate` function
38
39## Dependencies
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export default async function server(req: Request): Promise<Response> {
4 async function inlineUrls(cssString: string) {
5 const urlRegex = /url\(['"]?(.*?)['"]?\)/g;
6 let result = cssString;
22const rest = new REST({ version: "9" }).setToken(process.env.DISCORD_BOT_TOKEN);
23
24async function findUserVoiceChannel(guildId, userId) {
25 try {
26 const channels = await rest.get(Routes.guildChannels(guildId));
39}
40
41async function sayMessage(guildId, channelId, message) {
42 const url = googleTTS.getAudioUrl(message, {
43 lang: "en",
68}
69
70function createDiscordJSAdapter(channelId, guildId) {
71 return {
72 sendPayload: (payload) => {
7import { createRoot } from "https://esm.sh/react-dom/client";
8
9function App() {
10 const [startMenuOpen, setStartMenuOpen] = useState(false);
11 const [windows, setWindows] = useState([]);
119}
120
121function DesktopIcon({ icon, label, onClick }) {
122 return (
123 <div className="desktop-icon" onClick={onClick}>
128}
129
130function Window({ window, isActive, onClose, onMinimize, isMinimized, onFocus, updatePosition }) {
131 const [isDragging, setIsDragging] = useState(false);
132 const [dragOffset, setDragOffset] = useState({ x: 0, y: 0 });
219}
220
221function Taskbar({ startMenuOpen, toggleStartMenu, openWindow, onInstagramClick, time, windows, minimizedWindows, restoreWindow }) {
222 return (
223 <div className="taskbar">
251}
252
253function client() {
254 createRoot(document.getElementById("root")).render(<App />);
255}
259}
260
261async function server(request: Request): Promise<Response> {
262 return new Response(`
263 <!DOCTYPE html>
2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";
3
4export async function aqi(interval: Interval) {
5 const location = "seattle, wa"; // <-- change to place, city, or zip code
6 const data = await easyAQI({ location });
6import cheerio from "https://esm.sh/cheerio@1.0.0-rc.12";
7
8export default async function server(request: Request): Promise<Response> {
9 const url = new URL(request.url);
10 const zillowUrl = url.searchParams.get("url");
7import { createRoot } from "https://esm.sh/react-dom/client";
8
9function App() {
10 const [url, setUrl] = useState('');
11 const [listing, setListing] = useState(null);
59}
60
61function client() {
62 createRoot(document.getElementById("root")).render(<App />);
63}
65if (typeof document !== "undefined") { client(); }
66
67async function server(request: Request): Promise<Response> {
68 const url = new URL(request.url);
69 const cheerio = await import("https://esm.sh/cheerio@1.0.0-rc.12");
1Bot for Cama discord server. To initialize new slash commands, you have to run a separate bit of code. This is for modifying their functionality
12 * The email address(es) to send the email to. Only available to Val Town Pro subscribers.
13 * Can be a single string, IAddress object, or an array of strings/IAddress objects.
14 * @default the email of the logged user calling this function.
15 */
16 to?: (IAddress | string)[] | IAddress | string;