jellycommands icon indicating copy to clipboard operation
jellycommands copied to clipboard

Cooldown system for commands

Open akryptic opened this issue 1 year ago • 1 comments

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 avatar May 11 '24 12:05 akryptic

or cooldown thing can be moved to guards

akryptic avatar May 11 '24 12:05 akryptic