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

拿到群消息时每次获取 msg.room().memberAll() 会报错,第一次是好的 #195

Open
danni-cool opened this issue Nov 30, 2023 · 0 comments

Comments

@danni-cool
Copy link
Member

Message: Message#Text[🗣Contact@👥Room<加时间>] 面南背北
Waiting for the debugger to disconnect...
D:\wechatRoomBot\node_modules\wechaty\dist\cjs\src\user-modules\room.js:895
const contactListAll = await Promise.all(memberIdList.map(id => this.wechaty.Contact.find({ id })));
^

TypeError: Cannot read properties of undefined (reading 'map')
at WechatifiedUserClass.memberList (D:\wechatRoomBot\node_modules\wechaty\dist\cjs\src\user-modules\room.js:895:63)
at async Object.sendMsg2RecvdApi (D:\wechatRoomBot\src\service\webhook.js:49:28)

Node.js v18.17.1

memberIdList 有时候有,有时候无,第一次是有的,后面几次群消息再去查询 memberIdList 就变成undefined了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant