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
@plugin.rate(600, message='Wait your turn!', include_admins=True)defgame_func(bot, trigger):
# some e.g. reward-collection or PvP-combat function that users# *including bot admins* are only allowed to call after a cooldown
(Of course, apply to the limit-type-specific decorators as well.)
Problems Solved
There's no way at the moment for plugin devs to rate-limit triggers by admins, without resorting to manual workarounds.
This snippet from one of my mIRC-script clones demonstrates a potential use case. (It also returns a message with the remaining time, and pulls the allowed rate from a config value. Those would be separate feature requests in core, though remaining time is included in the list of requested message placeholders in #2325.)
Alternatives
No response
Notes
No response
The text was updated successfully, but these errors were encountered:
Requested Feature
Basically, the following:
(Of course, apply to the limit-type-specific decorators as well.)
Problems Solved
There's no way at the moment for plugin devs to rate-limit triggers by admins, without resorting to manual workarounds.
This snippet from one of my mIRC-script clones demonstrates a potential use case. (It also returns a message with the remaining time, and pulls the allowed rate from a config value. Those would be separate feature requests in core, though remaining time is included in the list of requested
message
placeholders in #2325.)Alternatives
No response
Notes
No response
The text was updated successfully, but these errors were encountered: