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
Extend the drink api to include cooldown annotations for ease of managing cooldowns @Require-like
Per: the time at which the uses gets reset
Rate: the number of times that are allowed the command to be executed in a specific amount of time
BucketType: Which to apply the cooldown on
The cooldown applys on that command with respect to the bucket type, if a player is on cooldown. it will call a handler callback1.
When annotated on the class
Either The cooldown mapping is shared across all sub commands OR Add a mapping as the same as @Cooldown being annotated on all of the sub commands
You can achive this by making a boolean or another annotated @ClassCooldown for example
Footnotes
A cooldown handler is should be a function that takes in (Player, DrinkContainer), (You may also make it return a boolean, if false the cooldown will be neglected) ↩
The text was updated successfully, but these errors were encountered:
Perhaps a system for binding annotations to whole command methods ("modifiers"?) similar to @Require would be nice to have, so that this and similar implementations can be done by users.
Extend the drink api to include cooldown annotations for ease of managing cooldowns
@Require
-likePer: the time at which the uses gets reset
Rate: the number of times that are allowed the command to be executed in a specific amount of time
BucketType: Which to apply the cooldown on
This is inspired by discord.py cooldowns
BucketTypes:
Behavior:
When annotated on an
@Command
annotated methodThe cooldown applys on that command with respect to the bucket type, if a player is on cooldown. it will call a handler callback1.
When annotated on the class
Either The cooldown mapping is shared across all sub commands OR Add a mapping as the same as
@Cooldown
being annotated on all of the sub commandsYou can achive this by making a boolean or another annotated
@ClassCooldown
for exampleFootnotes
A cooldown handler is should be a function that takes in (Player, DrinkContainer), (You may also make it return a boolean, if false the cooldown will be neglected) ↩
The text was updated successfully, but these errors were encountered: