Edits history of script submission #22514 for ' Send Message to 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(text: string, channel: string, slack: Slack) {
      const web = new WebClient(slack.token);
    
      await web.chat.postMessage({
        channel,
        text,
      });
    }
    

    Submitted by hugo989 2 days ago