We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please make sure you have read the Wechaty Puppet Service: WorkPro from Wechaty Official Website before you continue writing this issue.
IMPORTANT
DO NOT post your token in the issue. If we need to investigate the behavior of certain token, we will provide a private contact route.
Describe the bug 通过bot.Contact.load("contact ID") 无法获取contact,返回应该是一个空的Contact,造成后面Contact.say()报错
Info
bot.Contact.load()返回Print出来如下:
WechatifiedContactImpl { _events: [Object: null prototype] {}, _eventsCount: 0, _maxListeners: undefined, id: undefined, payload: undefined, [Symbol(kCapture)]: false }
用的Dependency如下: "wechaty": "^1.19.10", "wechaty-plugin-contrib": "^0.14.23", "wechaty-puppet": "^1.19.6", "wechaty-puppet-service": "^1.18.2"
code 如下:
let ctc=bot.Contact.load(cid); console.log(ctc); //后面ctc.say就会出错了,说 //ERR Config Wechaty unhandledRejection: Error: 13 INTERNAL: Cannot read properties of null (reading 'isFriend')
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
通过名字可以找到Contact,但同名时就不好区分。 好像wechaty其他种service也会用ID找到 undefined 的Contact,我不是很确定,不过 [https://wechaty.js.org/docs/api/contact]上还有用Contact.load这样用ID找Contact,所以不知道现在还能这样吗,还是我用错了。 希望能说明解决,谢谢帮助!
The text was updated successfully, but these errors were encountered:
你好,wechaty 1.x 中的 load 方法已经不对 bot 暴露了,根据 id 查联系人应该使用 bot.Contact.find({ id })
bot.Contact.find({ id })
Sorry, something went wrong.
A pull request to fix the documentation will be appreciated.
用 bot.Contact.find({id}) 没问题,然后之前我程序中本身有个小bug,不过现在可以获取contact了。谢谢帮助解决!
你好,wechaty 1.x 中的 load 方法已经不对 bot 暴露了,根据 id 查联系人应该使用 bot.Contact.find({ id }) 谢谢告知!然后可以问下Room load也不用了是吗,然后用bot.Room.find({ id }) ?谢了
谢谢告知!然后可以问下Room load也不用了是吗,然后用bot.Room.find({ id }) ?谢了
是的,也是一样的。
wechaty/docusaurus#1512
I'm working on that.
su-chang
hcfw007
No branches or pull requests
Please make sure you have read the Wechaty Puppet Service: WorkPro from Wechaty Official Website before you continue writing this issue.
IMPORTANT
DO NOT post your token in the issue. If we need to investigate the behavior of certain token, we will provide a private contact route.
Describe the bug
通过bot.Contact.load("contact ID") 无法获取contact,返回应该是一个空的Contact,造成后面Contact.say()报错
Info
bot.Contact.load()返回Print出来如下:
用的Dependency如下:
"wechaty": "^1.19.10",
"wechaty-plugin-contrib": "^0.14.23",
"wechaty-puppet": "^1.19.6",
"wechaty-puppet-service": "^1.18.2"
code 如下:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
通过名字可以找到Contact,但同名时就不好区分。
好像wechaty其他种service也会用ID找到 undefined 的Contact,我不是很确定,不过 [https://wechaty.js.org/docs/api/contact]上还有用Contact.load这样用ID找Contact,所以不知道现在还能这样吗,还是我用错了。
希望能说明解决,谢谢帮助!
The text was updated successfully, but these errors were encountered: