export async function main(
response_url: string,
text: string,
) {
const x = await fetch(response_url, {
method: 'POST',
body: JSON.stringify({ text: `ROGER ${text}` }),
});
} Submitted by admin 1096 days ago
import * as wmill from "https://deno.land/x/[email protected]/mod.ts";
export async function main(
response_url: string,
text: string,
) {
const tokenResource = await wmill.getResource("u/user/my_slack");
await fetch(response_url, {
method: 'POST',
body: JSON.stringify({ response_url, text: `ROGER ${text}` }),
headers: { "Authorization": `Bearer ${tokenResource.token}` },
});
return;
}
Submitted by admin 1096 days ago