ffao / Shiro

Helper bot for games in puzzling.stackexchange.com chat
MIT License
5 stars 6 forks source link

Pinning timing #18

Open boboquack opened 7 years ago

boboquack commented 7 years ago

Shiro seems to not pin team messages frequently. I think this might not be a problem of the limit on the number of pins, but rather the 'cooldown' periods imposed by the chat system:

Cooldown

I propose adding a 'timeout' between the sending and/or the pinning of the team messages (3 seconds should be enough), though I'm not entirely sure which piece of code is which and adding a random time.sleep(3) or some such could lead to bad processing in other areas.

Can someone help me with this?

ffao commented 7 years ago

I noticed the cool down problem, but I believe SE returns a 409 in that case. Given that I'm not seeing that many 409s in the console, I still think the main cause of the non-pinning is the pin limit.

However, this is still a problem worth fixing. Maybe add the sleep to pin_red and pin_blue?