puppet-xp
puppet-xp copied to clipboard
拿到群消息时每次获取 msg.room().memberAll() 会报错,第一次是好的
Message: Message#Text[🗣Contact<Daniel>@👥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了