Coodown
Can i reset the cooldown for a specific command for a specific user?
Solution:Jump to solution
not with the built in cooldown. You will have to make your own precondition.
21 Replies
Solution
not with the built in cooldown. You will have to make your own precondition.
i tried to do something like this
but that doesnt seem to work
you should make your own precondition
don't try to hack it into the default
so like make my own cooldown system ?
yes
thats so dumb
why not add the feature
1. we cant every feature under the sun
2. this is a very niche feature
3. PRs are technically always welcome
just a question
do you store the cooldown on maps (collections) or in cache ?
https://github.com/sapphiredev/framework/blob/main/src/preconditions/Cooldown.ts --> https://github.com/sapphiredev/utilities/blob/main/packages/ratelimits/src/lib/RateLimitManager.ts
GitHub
framework/src/preconditions/Cooldown.ts at main · sapphiredev/frame...
Discord bot framework built on top of discord.js for advanced and amazing bots. - sapphiredev/framework
GitHub
utilities/packages/ratelimits/src/lib/RateLimitManager.ts at main ·...
Common JavaScript utilities for Sapphire Projects. Contribute to sapphiredev/utilities development by creating an account on GitHub.
and where i can put the duration of the cooldown?
@Boomeravna like how i can do something like this
please, all you need to do is dig through the sapphire framework code. I, just like anyone else, doesn't like spoon feeding you the code.
try to do your own research for a change
No no im not asking for that, my question is just can i add more props to the
Command
optionsI know what you're asking and I'm telling you to do your own research for a change
yeah thanks for the hints, it worked
@Boomeravna Sorry, just a question can't i name the precondition as "Cooldown" ?
because when i name it Cooldown it doesnt apear even with the typescript augmentation
Sapphire Framework
Creating your own preconditions | Sapphire
Just as we did in Creating Commands, we will start by creating a preconditions subdirectory in