Public
Like
steamForumMentions
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v12View latest version
This is a cron that uses dreww's Steam Forum Scanner to regularly pull updates from Steam and surfaces them in Discord.
Example:
Before you can run the cron, you must add the following Environment Variables (via left sidebar of this val):
DISCORD_WEBHOOK_URL: In your Discord server → Server Settings → Integrations → Webhooks → New Webhook → Copy Webhook URL
import scanSteamForums from "https://esm.town/v/dreww/steamforumscanner";
export default async function(interval: Interval) {
const dota2Threads = await scanSteamForums({
gameName: "Dota 2",
embedColor: 9043685, // optional decimal color to change the embed highlight
steamId: "570",
discordWebhook: Deno.env.get("DISCHOOK_URL_1"),
});
}
main.tsxis a cron that runs automatically based on your configured schedule. You may also clickRunto manually trigger the cron at any time, especially for testing purposes.