Skip to content
This repository has been archived by the owner on Jun 1, 2020. It is now read-only.

Latest commit

 

History

History
75 lines (50 loc) · 2.27 KB

README-en.md

File metadata and controls

75 lines (50 loc) · 2.27 KB

WECHATY-PUPPET-PADCHAT (DEPRECATED)

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

DEPRECATED

This project is no longer maintained and supported, for people who need to use iPad way connect to wechat, please check wechaty-puppet-padpro

wechaty-puppet-padpro is an upgrade version of this project, provides more features and more stable service.


This module is a sub module of Wechaty Puppet.

INSTALL

npm install wechaty
npm install wechaty-puppet-padchat

SOURCE

import { Wechaty } from 'wechaty'

const WECHATY_PUPPET_PADCHAT_TOKEN = 'your-token-here'

const puppet = 'wechaty-puppet-padchat'
const puppetOptions = {
  token: WECHATY_PUPPET_PADCHAT_TOKEN,
}
  
const bot = new Wechaty({
  puppet,
  puppetOptions,
})

// You are all set

// Run wechaty
bot
.on('scan', (qrcode, status) => console.log(`Scan QR Code to login: ${status}\nhttps://api.qrserver.com/v1/create-qr-code/?data=${encodeURIComponent(qrcode)}`))
.on('login',            user => console.log(`User ${user} logined`))
.on('message',       message => console.log(`Message: ${message}`))
.start()

RUN

./node_modules/.bin/ts-node examples/wechaty-padchat-bot.ts

Get Token

Scan the qrcode to contact us and ask for token contact

More info about token

Doc

https://docs.chatie.io/wechaty

AUTHOR

Jiarui LI [email protected]

LICENSE

Apache-2.0