1
List Conversation History
One script reply has been approved by the moderators Verified
Created by rossmccrann 899 days ago Viewed 9572 times
0
Submitted by rossmccrann Deno
Verified 899 days ago
1
import { WebClient } from "https://deno.land/x/slack_web_api@1.0.3/mod.ts";
2
/*
3
@param: {string} channel - Conversation ID to fetch history for.
4
*/
5

6
type Slack = {
7
  token: string;
8
};
9
export async function main(slack_auth: Slack, channel: string) {
10
  const web = new WebClient(slack_auth.token);
11

12
  let response = await web.conversations.history({
13
    channel: channel,
14
  });
15

16
  return { response: response };
17
}
18