ZeroKnight / ZeroBot

My personal IRC/Multi-protocol Bot created (and re-created) for education and amusement.
MIT License
1 stars 0 forks source link

Refactor "cooldown" `deque`s and associated logic into a common class #21

Closed ZeroKnight closed 3 years ago

ZeroKnight commented 3 years ago

The concept of a "cooldown" deque for various ZeroBot phrases is common enough in the current set of feature modules to warrant them and their associated logic (e.g. _resize_*deque) to be encapsulated into a class in ZeroBot.common.

Ideas

ZeroKnight commented 3 years ago

Deciding to scrap this idea. There's very little "boilerplate" common enough between features (currently) that would warrant the overhead of a class, not to mention that how each module may use its cooldown deque will likely vary enough to cause using any implementation to be rigid and awkward.