提交 dd36db06 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

fix

上级 c76bd277
machine:
node:
version: 6.1.0
post:
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- sudo apt-get update
- sudo apt-get install google-chrome-stable
dependencies:
post:
notify:
webhooks:
# A list of hook hashes, containing the url field
......
const log = require('npmlog')
log.level = 'silly'
const Wechaty = require('../src/wechaty')
const bot = new Wechaty({head: true})
const bot = new Wechaty()
bot.init()
.then(bot.getLoginQrImgUrl.bind(bot))
.then(url => console.log(`Scan qrcode in url to login: \n${url}`))
.catch(e => console.error(e))
bot.on('message', m => {
console.log('RECV: ' + m.get('content')) // 1. print received message
......@@ -16,4 +15,5 @@ bot.on('message', m => {
bot.send(reply) // 3. do reply!
.then(() => console.log('REPLY: roger.')) // 4. print reply message
.catch(e => console.error(e))
})
......@@ -54,6 +54,7 @@ class Browser {
.set('phantomjs.binary.path', phantomjsExe)
.set('phantomjs.cli.args', [
'--ignore-ssl-errors=true' // this help socket.io connect with localhost
, '--load-images=false'
, '--remote-debugger-port=9000'
])
......
......@@ -56,7 +56,7 @@ class Wechaty extends EventEmitter {
return 'dong'
}
getLoginQrImgUrl() { return puppet.getLoginQrImgUrl() }
getLoginQrImgUrl() { return this.puppet.getLoginQrImgUrl() }
}
Puppet.Web = PuppetWeb
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册