0
Kick User
One script reply has been approved by the moderators Verified
Created by daniellisedaulin 930 days ago Viewed 9951 times
0
Submitted by rossmccrann Deno
Verified 916 days ago
1
import { WebClient } from "https://deno.land/x/slack_web_api@1.0.3/mod.ts";
2

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

9
  await web.conversations.kick({
10
    channel: channel,
11
    user: user,
12
  });
13

14
  return { message: "Successfully Kicked user" };
15
}
16