We have a trigger in #lobsters such that if a user names Jordon Peterson (via [Pp]eterson) we issue our standard blurb regarding non-association despite both communities using the label "Lobsters:"
The problem is that it triggers every time a user matches the trigger. It would be better if the trigger had a rate limit so it only replied every 5 minutes. The sopel API has a rate limiter, which can be used for this trigger to do just that:
We have a trigger in #lobsters such that if a user names Jordon Peterson (via [Pp]eterson) we issue our standard blurb regarding non-association despite both communities using the label "Lobsters:"
13:05 peterson
13:05 alynpost: The site has nothing to do with Jordan Peterson: https://lobste.rs/about#michaelbolton
This trigger is implemented in the following sopel module:
https://github.com/lobsters/lobsters-ansible/blob/master/roles/mockturtle/files/sopel_modules/peterson.py
The problem is that it triggers every time a user matches the trigger. It would be better if the trigger had a rate limit so it only replied every 5 minutes. The sopel API has a rate limiter, which can be used for this trigger to do just that:
https://sopel.chat/docs/plugin.html#sopel.module.rate
This issue covers adding that rate limiter as a decorator in the peterson module.