Edits history of script submission #22513 for ' List Conversation History (slack)'

  • bun
    One script reply has been approved by the moderators
    Ap­pro­ved
    import { WebClient } from "@slack/web-api";
    /*
    @param: {string} channel - Conversation ID to fetch history for.
    */
    
    type Slack = {
      token: string;
    };
    export async function main(slack_auth: Slack, channel: string) {
      const web = new WebClient(slack_auth.token);
    
      let response = await web.conversations.history({
        channel: channel,
      });
    
      return { response: response };
    }
    

    Submitted by hugo989 10 days ago