wechaty / plugin-contrib

Wechaty Plugin Ecosystem Contrib Package
https://paka.dev/npm/wechaty-plugin-contrib
Apache License 2.0
33 stars 12 forks source link

Cannot receive heartbeat msg #62

Open willin opened 2 years ago

willin commented 2 years ago
//     "wechaty-plugin-contrib": "0.19"
  bot.use(
    Heartbeat({
      contact: 'willinx',
      emoji: {
        heartbeat: '[爱心]',
        login: '[太阳]',
        logout: '[月亮]',
        ready: '[拳头]'
      },
      intervalSeconds: 5
    })
  );
image

Logs:

WECHATY_LOG=silly npx ts-node src/index.ts | grep Heartbeat
12:43:04 VERB WechatyPluginContrib Heartbeat("{"contact":"willinx","emoji":{"heartbeat":"[爱心]","login":"[太阳]","logout":"[月亮]","ready":"[拳头]"},"intervalSeconds":5}")
12:43:04 VERB WechatyPluginContrib Heartbeat installing on Wechaty#2ed9be83-1c86-4c46-a91c-13cb8d7b8d89<Puppet#1<PuppetPadlocal>(NONAME)>() ...
12:43:04 VERB WechatyPluginContrib Heartbeat setting `ready` event
12:43:04 VERB WechatyPluginContrib Heartbeat setting `logout` event
12:43:06 VERB WechatyPluginContrib Heartbeat wechaty.on(login)
12:43:06 VERB WechatyPluginContrib Heartbeat talkerList numbers: 1
12:43:06 VERB WechatyPluginContrib Heartbeat heart()...
12:43:06 SILL WechatyPluginContrib Heartbeat heart() new timer set
12:43:06 VERB WechatyPluginContrib Heartbeat sayEmoji(login)
12:43:06 VERB WechatyPluginContrib Heartbeat getEmoji(login)
12:43:07 SILL [LongLink] [43:8410] longlink stopHeartbeat
12:43:07 WARN [PadLocalClient] 
================================================================================
WARNING: Your token will be expired on: "2022/01/24". Please renew ASAP to avoid
                              service termination.
================================================================================

12:43:07 VERB WechatyPluginContrib Heartbeat sayEmoji(ready)

nenver got ready/heartbeat message

huan commented 2 years ago

The ready event will be depends on the puppet provider/implementation, and the heartbeat event will be emitted once every hour if I remember correctly.