Send Message to Channel

slack

Script slack Verified

by admin ยท 7/28/2022

The script

Submitted by admin Deno
Verified 360 days ago
1
import { WebClient } from "https://deno.land/x/[email protected]/mod.ts";
2

3
type Slack = {
4
  token: string;
5
};
6
export async function main(text: string, channel: string, slack: Slack) {
7
  const web = new WebClient(slack.token);
8

9
  await web.chat.postMessage({
10
    channel,
11
    text,
12
  });
13
}
14

Other submissions
  • Submitted by wangjian.cd865 Deno
    Created 1098 days ago
    1
    // import * as wmill from 'https://deno.land/x/windmill/index.ts'
    2
    
    
    3
    export async function main(x: string) {
    4
        return x
    5
    }
  • Submitted by choonfeng.sng05571 Deno
    Created 961 days ago
    1
    // import * as wmill from 'https://deno.land/x/windmill/index.ts'
    2
    
    
    3
    export async function main(x: string) {
    4
        return x
    5
    }