Readme

Recieve an email with a question each day from https://www.are.na/lisa-marie/asking-the-right-questions-sbkcnb9eank

Runs every 1 days
1
2
3
4
5
6
7
8
9
10
11
12
13
import { arenaChannelContents } from "https://esm.town/v/pomcute/arenaChannelContents";
import { email } from "https://esm.town/v/std/email";
export default async function questionPractice(interval: Interval) {
const contents = await arenaChannelContents({ channelId: "asking-the-right-questions-sbkcnb9eank" });
const textContents = contents.filter(item => item.class === "Text");
const randomPrompt = textContents[Math.floor(Math.random() * textContents.length)];
await email({
subject: randomPrompt.content,
text: randomPrompt.title,
});
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
August 14, 2024