提交 fdae0341 编写于 作者: L lijiarui 提交者: Huan (李卓桓)

remove m.send() fucntion (#323)

* remove send fucntion

* modify m.sen()

* change fileTransfer to fileHelper

* delete if
上级 46c64ba5
......@@ -12,7 +12,7 @@ const QrcodeTerminal = require('qrcode-terminal')
import {
Wechaty,
Message,
Contact,
Config,
log,
} from '../'
......@@ -62,13 +62,11 @@ bot
*/
.on('friend', async (contact, request) => {
let logMsg
const m = new Message()
m.set('to', 'filehelper')
const fileHelper = Contact.load('filehelper')
try {
logMsg = 'received `friend` event from ' + contact.get('name')
m.set('content', logMsg)
bot.send(m)
fileHelper.say(logMsg)
console.log(logMsg)
/**
......@@ -99,8 +97,7 @@ bot
}
console.log(logMsg)
m.set('content', logMsg)
bot.send(m)
fileHelper.say(logMsg)
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册