@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
28 lines (19 loc) • 551 B
Markdown
The `listChannelUsers` method lists all users in a specific channel.
```typescript
import { MicrofoxSlackClient } from '@microfox/slack';
const client = new MicrofoxSlackClient(process.env.SLACK_BOT_TOKEN);
(async () => {
try {
const users = await client.listChannelUsers('C12345678');
console.log(users);
} catch (error) {
console.error(error);
}
})();
```
- `channelId` (string): The ID of the channel to get the members of.
This method returns an array of user IDs.