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

Add cooldowns to commands #27

Open
bosukas opened this issue Mar 21, 2021 · 3 comments
Open

Add cooldowns to commands #27

bosukas opened this issue Mar 21, 2021 · 3 comments
Labels
Status: Stale Has had no activity for some time. Type: Enhancement Improvements to existing features. Type: Feature Suggestions and tracking for new features.

Comments

@bosukas
Copy link
Contributor

bosukas commented Mar 21, 2021

Summary

Add a way of specifying cooldowns for commands.

Preferred Behaviour

The interface for the cooldowns could look something like this:

cooldown {
    user { event ->
        1 Minute
    }
    
    member { event ->
        if (event.author.id == 332947254602235914) {
            30 Seconds
        } else {
            1 Minute
        }
    }
}
@bosukas
Copy link
Contributor Author

bosukas commented Mar 26, 2021

Just another idea of how this can be structured in a command

cooldown { bucketType -> 
    when {
        bucketType.CHANNEL -> {
            15 Seconds
        }
        bucketType.USER -> {
            30 Seconds
        }
        bucketType.MEMBER -> {
            if (event.author.id == 332947254602235914) {
                30 Seconds
            } else {
                1 Minute
            }
        }
    }
}

@gdude2002 gdude2002 added Type: Enhancement Improvements to existing features. Type: Feature Suggestions and tracking for new features. labels Mar 28, 2021
@gdude2002
Copy link
Member

While I do think that cooldowns are a very valuable thing in a framework like this, I'm not currently in a position where I know how to implement them - I'm going to need help with this one

@gdude2002 gdude2002 added the Status: Stale Has had no activity for some time. label Sep 22, 2021
@gdude2002
Copy link
Member

The pull request that would have solved this (#191) hasn't been touched in five months, so I've been left with little choice other than to close it. Perhaps in the future, someone else could have a look at getting this implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Has had no activity for some time. Type: Enhancement Improvements to existing features. Type: Feature Suggestions and tracking for new features.
Projects
None yet
Development

No branches or pull requests

2 participants