steamforumscanner
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
This script takes a Steam ID, Game Name, and array of discord webhook url destinations. It scans the main Steam community discussion page, and looks for new threads and threads with new comments, and then constructs a webhook with a configurable amount threads per hook, sending it to all configured destinations.
Right now, the script only looks at the main forum within the Steam community, so if you have multiple forums you'd probably need to extend it.
To use this script, rig up something like the following as a CRON type val:
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"), // set up your webhook urls as environment variables
Deno.env.get("DISCHOOK_URL_2"), // you can pass in a single url or an array
].filter(Boolean), // filters out empty env variablees
});
}
This was written extensively with Townie, and I am not a real programmer. I apologize in advance to all real programmers who might read this, and to all human beings. But I think it works pretty good.