open-index/open-npm huggingface dataset:
npm package: @oouuyab/nestjs-slack-notifier
Description: A NestJS module for sending Slack notifications using the Slack Web API.
Author: oouuyab
Latest version: 0.1.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# NestJS Slack Notifier

A NestJS module for sending Slack notifications using the Slack Web API.

## Installation

```bash
npm install @oouuyab/nestjs-slack-notifier @slack/web-api
```

## Usage

```ts
import { Module } from '@nestjs/common';
import { SlackModule } from 'nestjs-slack-notifier';

@Module({
  imports: [
    SlackModule.forRoot({
      token: process.env.SLACK_TOKEN,
      defaultChannel: '#general',
    }),
  ],
})
export class AppModule {}
```

Inject `SlackService` in your components:

```ts
constructor(private readonly slackService: SlackService) {}

async notify() {
  await this.slackService.sendMessage('Hello from NestJS!');
}
```