Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用say发送图片无效,测试代码如下 #91

Closed
wfdGitHub opened this issue May 5, 2019 · 2 comments
Closed

使用say发送图片无效,测试代码如下 #91

wfdGitHub opened this issue May 5, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@wfdGitHub
Copy link

wfdGitHub commented May 5, 2019

const { Wechaty } = require('wechaty') // import { Wechaty } from 'wechaty'
var FileBox = require("file-box").FileBox
var fileBox1 = FileBox.fromUrl("https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=455610afdfc8a786a12a4c0e5708c9c7/5bafa40f4bfbfbedcb2d862a76f0f736afc31f6a.jpg")
var wechatyRob = new Wechaty()
wechatyRob.on('scan', function(url,code) {
	  if (!/201|200/.test(String(code))){
	    let loginUrl = url.replace(/\/qrcode\//, '/l/')
	    require('qrcode-terminal').generate(loginUrl)
	  }
	  console.log(`${url}\n[${code}] Scan QR Code in above url to login: `)
})
wechatyRob.on('login',user => console.log(`User ${user} logined`))
wechatyRob.on('message',function(message) {
	console.log(message.text())
	if(message.text() == "123"){
		message.from().say("1111")
		message.from().say(fileBox1)
	}
})
wechatyRob.start()
@wfdGitHub wfdGitHub changed the title 使用say发送图片无效 使用say发送图片无效,测试代码如下 May 5, 2019
@dooozi
Copy link

dooozi commented Jun 25, 2019

@wfdGitHub 兄弟,解决没?

@suntong
Copy link

suntong commented Apr 2, 2021

Closing since it's been merged already.
Let me know otherwise.

@suntong suntong closed this as completed Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants