Open huangmu168 opened 3 years ago
python版本是3.9 wechaty版本是wechaty-0.7.dev16 ![Uploading image.png…]()
I can't reproduce your problem which will emit ready event twice. I guess that you should set scheduler as a property to avoid start twice.
Hope that can help you.
ping @huangmu168
@padlocal I can reproduce the problem steadily, here is my log info:
2021-05-31 00:21:15,502 - Wechaty - INFO - receive <ready> event <EventReadyPayload(data='ready')>
INFO:__main__:ready event
2021-05-31 00:21:20,157 - Wechaty - INFO - receive <ready> event <EventReadyPayload(data='ready')>
INFO:__main__:ready event
Add a counter to on_ready, only allowed on_ready to run once
Add a counter to on_ready, only allowed on_ready to run once
I think it's a temporary issue, you can do it in latest version. I will track it. Thanks for your issue and sharing your great solution.
My bot's on_ready didn't run!
我用macos启动不执行ready,用centos启动执行两次ready
代码如下:
结果: 2021-04-16 11:40:00,024 - Room - INFO - Room say <我在运行中[發][發][發], None> 2021-04-16 11:40:00,025 - Room - INFO - Room say <我在运行中[發][發][發], None>