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

Cooldown system for commands #203

Open
akryptic opened this issue May 11, 2024 · 1 comment
Open

Cooldown system for commands #203

akryptic opened this issue May 11, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@akryptic
Copy link
Contributor

Describe the feature

commands should have property cooldown.
and an array containing all the commands should be exposed somehow (cause i am sure it (the array containing all the commands) is being used internally to register the commands), so that we can use that to loop over commands and check if they have cooldown & if they have , then we can create our own cooldown system in the interactionCreate event. Or you can provide a internal cooldown system (in that case, no need to expose all commands array)

Examples

export default command({
    cooldown: 5000,  // 5000 milliseconds
    run: ({ interaction, client, props }) => {
        // Do something
    }
})```
@akryptic akryptic added the enhancement New feature or request label May 11, 2024
@akryptic
Copy link
Contributor Author

or cooldown thing can be moved to guards

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

No branches or pull requests

1 participant