Skip to content

Slack Client

A TypeScript client for the Slack Web API — wraps auth.test and chat.postMessage.

Terminal window
pnpm add @theholocron/slack-client
import { createSlackClient } from "@theholocron/slack-client";
const client = createSlackClient({
token: process.env.SLACK_BOT_TOKEN!,
});
const identity = await client.auth.test();
console.log(identity.team, identity.user);
await client.chat.postMessage("#deploys", "Deploy finished ✅");

Slack’s Web API always responds with HTTP 200 and an ok field signalling success — a non-ok response throws ProviderApiError the same way a non-2xx response does for every other client here.

The full API reference is generated from the package’s TSDoc comments.