0.0.98 • Published 5 years ago

unique-wechaty-puppet-padplus v0.0.98

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
5 years ago

WECHATY-PUPPET-PADPLUS

Powered by Wechaty NPM Version npm (tag) TypeScript Linux/Mac Build Status

Notice

  1. Wechaty-puppet-padplus is still in very Early Alpha Stage, please make sure you have the necessary engineering technics to deal with the bugs instead of just asking for support.
  2. You are welcome to file an issue to reproduce the problem, if it is reproducible, we will fix that as soon as possible.
  3. If you need a stable version, please keep waiting until we release the stable one.

Install

1. Init

mkdir padplus

npm init

2. Install the latest wechaty

npm install wechaty

3. Install wechaty-puppet-macpro

Notice: wechaty-puppet-padplus still in alpha test period, so we keep updating the package, you should install the latest packge by using @latest until we release the stable package.

npm install wechaty-puppet-padplus@latest

4. Install other dependency

npm install qrcode-terminal

Example

import { Wechaty       } from 'wechaty';
import { PuppetPadplus } from 'wechaty-puppet-padplus';
import { generate      } from 'qrcode-terminal';

const token = 'your-token';

const puppet = new PuppetPadplus({
  token,
})

const bot = new Wechaty({
  puppet,
});

bot
  .on('scan', (qrcode) => {
    generate(qrcode, {
      small: true
    });
  })
  .on('message', msg => {
    console.log(`msg : ${msg}`)
  })
  .start()