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

slack

Created by admin 877 days ago Viewed 284493 times
0
Submitted by admin Deno
Verified 877 days ago
1
import { WebClient } from "https://deno.land/x/slack_web_api@1.0.0/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