0.0.1 • Published 10 months ago

wechaty-puppet-ferry v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

wechaty-puppet-ferry

npm version npm downloads bundle JSDocs License

Wechaty Puppet for WechatFerry

Quick Start

Install:

pnpm add wechaty wechaty-puppet-ferry

Import:

import { WechatyBuilder, log } from 'wechaty'
import { PuppetFerry } from 'wechaty-puppet-ferry'

const puppet = new PuppetFerry()
const bot = WechatyBuilder.build({ puppet })

bot.on('start', () => log.info('start'))
bot.on('ready', () => log.info('ready'))
bot.on('message', (msg) => {
  const taler = msg.talker()
  if (msg.type() === bot.Message.Type.Text) {
    log.info(`${taler.name()}: ${msg.text()}`)
  }
})

bot.start()

Callback:

Set WcfRust callback url to http://localhost:10011/callback and click start button

Funding

License

MIT License © 2024-PRESENT mrrhq