1
List Conversation History
One script reply has been approved by the moderators Verified
Created by rossmccrann 674 days ago Viewed 5096 times
0
Submitted by rossmccrann Deno
Verified 674 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