This script respond to a slack command /windmill <text>.
/windmill <text>
1
export async function main(response_url: string, text: string) {
2
const x = await fetch(response_url, {
3
method: "POST",
4
body: JSON.stringify({ text: `ROGER ${text}` }),
5
});
6
const username = await Deno.env.get("WM_USERNAME");
7
console.log(`user = ${username}`);
8
}
9
export async function main(
response_url: string,
text: string,
) {
method: 'POST',