import discordwebhook from "https://deno.land/x/discordwebhook/mod.ts";
import { getResumeUrls } from "https://deno.land/x/windmill@v1.85.0/mod.ts";
type DiscordWebhook = {
webhook_url: string;
};
export async function main(discord_webhook: DiscordWebhook, message: string = "A flow is requesting an approval to be resumed") {
const webhook = new discordwebhook(discord_webhook.webhook_url);
const { approvalPage } = await getResumeUrls();
const fullMessage = `${message} [approval page](${approvalPage})`;
const ret = await webhook.createMessage(fullMessage);
return ret;
}
Submitted by henri186 178 days ago