wechaty / puppet-padlocal

Puppet PadLocal is a Pad Protocol for WeChat
https://wechaty.js.org/docs/puppet-providers/padlocal
Apache License 2.0
642 stars 88 forks source link

The urllink 's promise object is empty? #92

Closed 9cat closed 3 years ago

9cat commented 3 years ago

By this code const urlLink = message.toUrlLink() console.log(" #######=>"+JSON.stringify(urlLink))

I got empty object for urlLink , expect the data like:

urlLink = new UrlLink ({ description : 'WeChat Bot SDK for Individual Account, Powered by TypeScript, Docker, and Love', thumbnailUrl: 'https://avatars0.githubusercontent.com/u/25162437?s=200&v=4', title : 'Welcome to Wechaty', url : 'https://github.com/wechaty/wechaty', })

So I should get the vaule for urlLink.url.

am I correct?

9cat commented 3 years ago

use

const urlLink = await message.toUrlLink()

Problem solved!