python-wechaty icon indicating copy to clipboard operation
python-wechaty copied to clipboard

监听信息较多导致机器人部分操作无法执行

Open Hyfred opened this issue 3 years ago • 1 comments

之前的测试号用的一个没加什么群的测试号。代码里面写的关键字回复、拉群全都正常。因为好友上限的限制,换了一个大号。大号加的群较多,控制面板上一直在刷监听到的聊天信息。导致有些关键字没能触发机器人的行为。或者只触发了一半。也没报错。不知道大家有没有遇到这个问题。

等信息较少时发关键字一般能触发。有时候就需要发多次才能触发一次。这种情况也不是机器人掉线了。但是定位不到原因在哪。或者有没有办法不监听群信息,可以控制变量试一下效果。

Hyfred avatar Jul 11 '22 23:07 Hyfred

Yes, I have meet this problem month ago. This issue is from the active status when connecting with the docker gateway, you can use the following solution:

  • start bot with docker and expose the health checking port
  • using the watchtower to check the active status of bot

here is my best practice:https://github.com/wechaty/python-wechaty-template

wj-Mcat avatar Jul 12 '22 05:07 wj-Mcat