new versions bug: The "listener" argument must be of type Function. Received type undefined
Created by: guoxiangke
Today I update the versions with:
npm install wechaty@latest
npm install wechaty-puppet-padplus@latest
before I used this works:
wechaty.on('message', './listeners/on-message')
but after updated , it's shows error and I fixed by:
import { onMessage } from './listeners/on-message'
wechaty.on('message', onMessage)
but when run, there is a bug report:
TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type Function. Received type undefined
at checkListener (events.js:55:11)
at _addListener (events.js:214:3)
at Wechaty.addListener (events.js:272:10)
at Wechaty.on (/Users/dale/Sites/wechaty-nuxt/node_modules/wechaty/src/wechaty.ts:347:18)
at Promise (/Users/dale/Sites/wechaty-nuxt/server/bot/index.ts:62:15)