puppet-supports icon indicating copy to clipboard operation
puppet-supports copied to clipboard

PadLocal: 发送信息错误!

Open ccgulan opened this issue 1 year ago • 0 comments

出现如下错误: init error: Error: Wechaty User Module (WUM, for example: wechaty.Room) can not be used before wechaty.start()! at guardWechatify (file:///E:/wechat-robot/node_modules/wechaty/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.js:78:11) at get Contact [as Contact] (file:///E:/wechat-robot/node_modules/wechaty/dist/esm/src/wechaty-mixins/wechatify-user-module-mixin.js:23:32) at file:///E:/wechat-robot/bot.js:58:29

代码如下: try { bot.start() .then(() => log.info('StarterBot', 'Starter Bot Started.')) .catch(e => log.error('StarterBot', e)) const contact = await bot.Contact.find({name: 'xucj'}) await contact.say('wechaty start!')

} catch (error) { console.log('init error: ', error); }

ccgulan avatar Jan 23 '24 02:01 ccgulan