You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #2632 (for @plugin.interval). This proposes adding _lazy versions of the existing rate* decorators that take the bot.settings.
Problems Solved
This weekend I wrote a command that needs channel rate-limiting not to prevent overloading anything, but just to prevent users from spamming a command with several lines of output.
Bot owners other than myself might reasonably want to lengthen or shorten the cooldown period, without editing the plugin source code.
Alternatives
Clone/fork the plugin and edit its source code
Less than ideal because the bot owner is now on the hook for pulling in upstream changes, either with Git or manually.
Ignore the bot's rate-limiting features and implement bespoke logic
I haven't completely decided against doing this in a closer-to-1.0 version of my new plugin, but it's tedious to duplicate most of what core does (keep track of last usage time, check against current time, send feedback to the user if the limit is enforced) just to replace a single value in the calculation with a different variable.\
Notes
No response
The text was updated successfully, but these errors were encountered:
Requested Feature
Similar to #2632 (for
@plugin.interval
). This proposes adding_lazy
versions of the existingrate*
decorators that take thebot.settings
.Problems Solved
This weekend I wrote a command that needs channel rate-limiting not to prevent overloading anything, but just to prevent users from spamming a command with several lines of output.
Bot owners other than myself might reasonably want to lengthen or shorten the cooldown period, without editing the plugin source code.
Alternatives
Less than ideal because the bot owner is now on the hook for pulling in upstream changes, either with Git or manually.
I haven't completely decided against doing this in a closer-to-1.0 version of my new plugin, but it's tedious to duplicate most of what core does (keep track of last usage time, check against current time, send feedback to the user if the limit is enforced) just to replace a single value in the calculation with a different variable.\
Notes
No response
The text was updated successfully, but these errors were encountered: