Edits history of script submission #22522 for ' Leave Channel (slack)'

  • bun
    One script reply has been approved by the moderators
    Ap­pro­ved
    import { WebClient } from "@slack/web-api";
    
    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.leave({
        channel: channel,
      });
    
      return { response: response };
    }
    

    Submitted by hugo989 7 days ago