wechaty-robot

基于 wechaty-puppet-padplus 的微信机器人助手

Stars
6

wechaty-robot

wechaty-puppet-padplus

wechaty-puppet-padplus2020wechaty-puppet-padlocal

  • @
  • 25M

|-- img                     # 
|-- src/
|---- listeners/
|------ on-scan.js          # 
|------ on-room.js          # 
|------ on-message.js       # 
|------ on-friend.js        # 
|---- config.js             # 
|---- index.js              # 
|-- package.json

wechatywechaty ~~wechaty-puppet-padpluswechaty ipad ~~

wechaty-puppet-padlocalwechaty ipad

// init
const bot = new Wechaty({
  puppet: new PuppetPadplus({
    token: config.token
  }),
  name: config.name
})

bot.on('scan', onScan) // 
bot.on('login', (user) => log.info('StarterBot', '%s login', user))
bot.on('logout', (user) => log.info('StarterBot', '%s logout', user))
bot.on('message', onMessage(bot)) // 
bot.on('friendship', onFriendShip) // 
bot.on('room-join', onRoomJoin) // 

bot
  .start()
  .then(() => {
    log.info('StarterBot', 'Starter Bot Started.')
  })
  .catch((e) => log.error('StarterBot', e))

git clone https://github.com/zoudingyi/wechaty-robot.git

cd wechaty-robot
npm install
npm run serve

  1. src/config.js
  2. config