How to reset the command cooldown in JS
I've been searching around in the server and the only solution I found was written in TypeScript, any way to do this in JS?
4 Replies
TypeScript is JavaScript. All valid JavaScript is also valid TypeScript. You can just ignore the type information and write the exact same code. For example:
vs JS
i see, the solution i found was a little heavy on types i got overwhelmed trying to figure it out
https://discord.com/channels/737141877803057244/1148149986547208192/1148174169616437338
thought id ask in case there was a separate solution
i did find a snippet of code without the types but it errors out on the .buckets and i couldnt figure out how to fix it
was this one in the legacy support channel
https://discord.com/channels/737141877803057244/737142503043498015/1042220290643599432
never got the hang of it trying to make sense of the weakmaps
Solution
now the top link code is JS, see how easy it is to remove types.
i dont think i have the brain capacity to understand why i got a
TypeError: Cannot read properties of undefined (reading 'buckets')
error beforehand LMAO
thank you regardless that does work