Send Message to Channel
One script reply has been approved by the moderators Verified

slack

Created by admin 1278 days ago Picked 189 times
Submitted by admin Deno
Verified 250 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