Skip to content

mrrhq/wechaty-puppet-wcferry

Repository files navigation

wechaty-puppet-wcferry

npm version npm downloads bundle JSDocs License

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()

Funding

License

MIT License © 2024-PRESENT mrrhq