Edits history of script submission #22521 for ' Set Channel Purpose (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,
      purpose: string
    ) {
      const web = new WebClient(slack_auth.token);
    
      await web.conversations.setPurpose({
        channel: channel,
        purpose: purpose,
      });
    
      return { message: "Successfully updated channel purpose" };
    }
    

    Submitted by hugo989 6 days ago