UNPKG

@microfox/slack

Version:

This package provides a lightweight, proxy interface to the official Slack Web API, offering a curated set of the most commonly used functions for building Slack integrations. It is designed to be simple, efficient, and easy to integrate into your project

37 lines (25 loc) 882 B
# removeUserFromChannel The `removeUserFromChannel` method removes a user from a channel. ## Usage ```typescript import { MicrofoxSlackClient } from '@microfox/slack'; const client = new MicrofoxSlackClient(process.env.SLACK_BOT_TOKEN); (async () => { try { await client.removeUserFromChannel('C12345678', 'U87654321'); console.log('User removed from channel.'); } catch (error) { console.error(error); } })(); ``` ## Arguments - `channelId` (string): The ID of the channel to remove the user from. - `userId` (string): The ID of the user to remove. ## Response This method returns an object with a single `ok` property. ### Response Schema | Property | Type | Description | | -------- | ------- | ------------------------------------- | | `ok` | Boolean | `true` if the request was successful. | </rewritten_file>