feat!: Add burstable counts to cooldowns #368
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This enables for commands to be invoked multiple times before they get put on cooldown. A cooldown cycle begins with the first instance a command is invoked and ends when the cooldown expires. When the cooldown expires, the number of invokes also resets to 0.
By default, the burstable amount for each type of cooldown is set to 1, which will mimic the old behavior, only allowing for 1 command invoke per cooldown cycle. Command attribute macros that do not explicitly add these fields will inherit the default value.
The reason why this change is marked as breaking is due to
CooldownConfig
having additional public fields being added. This struct was already marked as non-exhaustive, so the user should expect this struct to break.