wechaty-puppet-wcferry
v0.1.7
Published
Wechaty Puppet for WechatFerry
Downloads
3
Maintainers
Readme
wechaty-puppet-wcferry
Wechaty Puppet for WechatFerry
Quick Start
Install:
pnpm add wechaty wechaty-puppet-wcferry
Import:
import { WechatyBuilder, log } from 'wechaty'
import { PuppetWcferry } from 'wechaty-puppet-wcferry'
const puppet = new PuppetWcferry()
const bot = WechatyBuilder.build({ puppet })
bot.on('start', () => log.info('start'))
bot.on('ready', () => log.info('ready'))
bot.on('login', user => log.info(`${user.name()} login`))
bot.on('message', (msg) => {
const taler = msg.talker()
if (msg.type() === bot.Message.Type.Text) {
log.info(`${taler.name()}: ${msg.text()}`)
}
})
bot.start()