Cooldowns not correctly working
I have attached the hastebin code.
I have the commands working however it never puts the command into cooldown and I can run them back to back with no errors.
https://pastebin.com/CPPKKfrE
Pastebin
// Requiring Classes necessary for functioning botconst fs = requir...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
4 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OP14.14.1 discord js
18.13.0 node
you are creating a new cooldown collection everytime your bot receives an interaction
move that code outside of that event, leave it globally and it also just has to run once
like when you register your commands
Ok so put that in my index.js and call it into my command handler
ah there we go! thank you!
for the archive of what fixed it