1.0.3 • Published 2 years ago

nestjs-wechaty v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

nestjs-wechaty

NestJs中使用wechaty-decorator

可以使用装饰器方便的处理不同类型的事件

Install

npm install nestjs-wechaty
# or
yarn add nestjs-wechaty
# or
pnpm add nestjs-wechaty

Example

/**
 * nestjs配置方法
 * filePath: ./src/app.module.ts
 * /

import {Module} from '@nestjs/common'
import {AppController} from './app.controller'
import {AppService} from './app.service'
import {WechatyModule} from 'nestjs-wechaty'

@Module({
  imports: [
    WechatyModule.register({
      botConfig: {
        name: 'YOUER_BOT_NAME',
        puppet: 'wechaty-puppet-wechat'
      },
      plugins: [
        // xxx
      ]
    })
  ],
  controllers: [AppController],
  providers: [AppService]
})
export class AppModule {
}

wechaty-decorator使用方法

wechaty-decorator