Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple cooldowns #470

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bartmoorman
Copy link

  • Add support for multiple cooldowns per command

Description

This adds support for multiple cooldowns for a given command. It also adds support for turbo, vip, and broadcaster buckets. It checks each cooldown individually and if any of the cooldowns have expired, the command is invoked. If none of the cooldowns have expired, it raises a CommandOnCooldown exception using the time of the cooldown which will expire first.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
    • I have updated the changelog with a quick recap of my changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)
  • I have read and agree to the Developer Certificate of Origin for this contribution

* Add support for multiple cooldowns per command
@bartmoorman bartmoorman changed the title Support multiple cooldowns (#1) Support multiple cooldowns Sep 22, 2024
@chillymosh
Copy link
Collaborator

Before I review the code, which honestly most likely won't get merged soon as we're pushing ahead with 3.x in the very near future.

You ticked that this fixes an issue, which issue does it fix? As it looks purely like new features based on the description.

You also ticked it contains breaking changes, we don't make or merge breaking changes for a same major version.

@bartmoorman
Copy link
Author

bartmoorman commented Sep 22, 2024

Issue fixed: it looks like multiple cooldowns were implemented but did not work as expected. Before this PR, it is possible to have multiple cooldowns for a command, but doing so raises an error when the command is invoked.

Something new: support for turbo, vip, and broadcaster buckets.

Breaking changes: this does rename some of the methods within Cooldown class. This could possibly break if anyone is using cooldowns outside of supported means. If cooldowns are being used as documented and advertised, there should not be any breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants