import type { Resource } from "https://deno.land/x/windmill@v1.27.2/mod.ts";
export async function main(
webhook: Resource<"discord_webhook">,
content: string,
) {
const req = await fetch(webhook, {
method: "POST",
headers: { "Content-type": "application/json" },
body: JSON.stringify({ content }),
});
if (req.status != 200) {
throw Error();
}
}
Submitted by admin 842 days ago