Skip to content
New issue

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

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

Already on GitHub? # to your account

Add cooldowns #13

Open
1 task done
hypergonial opened this issue Oct 18, 2022 · 1 comment
Open
1 task done

Add cooldowns #13

hypergonial opened this issue Oct 18, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@hypergonial
Copy link
Member

Summary

Add an easy way to handle cooldowns for custom command handler implementations, or any other usecase requiring them.

Why is this needed?

It could be handy to enforce ratelimits, or just to create custom logic within Discord bots.

Ideal implementation

Cooldown buckets that can operate on a variety of types, (perharps passing a lambda to tell it how to extract the hash so it works on any type?) and logic that can either wait for the cooldown to expire then continue or raise errors (or other similar behaviour)

Checklist

  • I have searched the issue tracker and have made sure it's not a duplicate. If it is a follow up of another issue, I have specified it.
@hypergonial hypergonial added the enhancement New feature or request label Oct 18, 2022
@Lunarmagpie
Copy link
Collaborator

The lambdas are what i did for crescent. It works very well.

The rate limit should be a sliding window rate limit imo. It is the best kind honestly.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants