You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wechaty Puppet v0.49 and the previous version, we need to implement the start() and stop() on child class, and we need to manage the state by ourselves, like:
log.warn('Puppet','start() found that is starting/statred...')
awaitthis.state.ready('on')
log.warn('Puppet','start() found that is starting/statred... done')
return
From v0.51, we can reuse those codes from the abstract base class, and we can put all our function code in onStart() and onStop(), without care about the state anymore.
The start() and stop() method in the Puppet abstract base class will take care of the state and call onStart() and onStop for you.
Wechaty Puppet v0.49 and the previous version, we need to implement the
start()
andstop()
on child class, and we need to manage the state by ourselves, like:puppet/src/puppet/puppet.ts
Lines 138 to 142 in e76d675
From v0.51, we can reuse those codes from the abstract base class, and we can put all our function code in
onStart()
andonStop()
, without care about thestate
anymore.The
start()
andstop()
method in the Puppet abstract base class will take care of thestate
and callonStart()
andonStop
for you.The text was updated successfully, but these errors were encountered: