Closed ccgulan closed 1 year ago
@ccgulan 目前标签相关功能在wechaty中还未实现,如果需要使用建议安装 @juzi/wechaty 包,只需要修改引用包即可,逻辑代码不用修改。
@ccgulan 目前标签相关功能在wechaty中还未实现,如果需要使用建议安装 @juzi/wechaty 包,只需要修改引用包即可,逻辑代码不用修改。
好的,谢谢了
@ccgulan 目前标签相关功能在wechaty中还未实现,如果需要使用建议安装 @juzi/wechaty 包,只需要修改引用包即可,逻辑代码不用修改。
好的,谢谢了
@ccgulan 目前标签相关功能在wechaty中还未实现,如果需要使用建议安装 @juzi/wechaty 包,只需要修改引用包即可,逻辑代码不用修改。
@ccgulan 目前标签相关功能在wechaty中还未实现,如果需要使用建议安装 @juzi/wechaty 包,只需要修改引用包即可,逻辑代码不用修改。
@su-chang 请问能取得同个企业的微信号的手机号码和部门吗?
@ccgulan 可以获取手机号,部门还不支持。
@ccgulan 可以获取手机号,部门还不支持。
@su-chang 那请问手机号如何获取,另外部门什么时候能支持?
// 获取手机号
contact.phone()
暂无支持获取部门的计划。
长时间没有后续回复,问题关闭。
code: export async function onMessage(msg) { if (!bot) { bot = this; } try { const room = msg.room() const from = msg.talker() var text = msg.text() if (!from || from.id == 'weixin') return const phone = await getPhone(from); if (msg.age() > 10 || msg.self()) { return; }
async function getPhone(contact) { const tag = await getPhoneTag(contact); if (tag) { return tag.id.replace('phone/', ""); } return undefined; }
async function getPhoneTag(contact) { const tags = await contact.tags(); //An error occurred here const tag = tags.find(tag => tag.id.startsWith('phone/')); return tag; }
error: GError: 12 UNIMPLEMENTED: [object Object] at callErrorFromStatus (E:\wechat-robot -2\wechat-robot\node_modules\@grpc\grpc-js\build\src\call.js:31:19) at Object.onReceiveStatus (E:\wechat-robot -2\wechat-robot\node_modules\@grpc\grpc-js\build\src\client.js:192:76) at Object.onReceiveStatus (E:\wechat-robot -2\wechat-robot\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:360:141) at Object.onReceiveStatus (E:\wechat-robot -2\wechat-robot\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:323:181) at E:\wechat-robot -2\wechat-robot\node_modules\@grpc\grpc-js\build\src\resolving-call.js:93:78 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) for call at at ServiceClientImpl.makeUnaryRequest (E:\wechat-robot -2\wechat-robot\node_modules\@grpc\grpc-js\build\src\client.js:160:34) at ServiceClientImpl.tagContactList (E:\wechat-robot -2\wechat-robot\node_modules\@grpc\grpc-js\build\src\make-client.js:105:19) at node:internal/util:375:7 at new Promise ()
at bound (node:internal/util:361:12)
at PuppetService.tagContactList (file:///E:/wechat-robot%20-2/wechat-robot/node_modules/wechaty-puppet-service/dist/esm/src/client/puppet-service.js:1326:44)
at WechatifiedUserClass.tags (file:///E:/wechat-robot%20-2/wechat-robot/node_modules/wechaty/dist/esm/src/user-modules/contact.js:526:57)
at getPhoneTag (file:///E:/wechat-robot%20-2/wechat-robot/on-message.js:571:30)
at getPhone (file:///E:/wechat-robot%20-2/wechat-robot/on-message.js:583:21)
at WechatyImpl.onMessage (file:///E:/wechat-robot%20-2/wechat-robot/on-message.js:699:25) {