I have a simple node.js project in a folder with no extra stuff like discord or databases. For data storage i use json files. Now here's the question. How would i make a cooldown for a specific file for a specific user, but they still should be able to type in the terminal.
So like 'cooldown.js'
Could be run by someone called 'potato' and it works fine. Then it could be run by someone called 'potato2' and it works fine
( Name is defined by args[0].toLowerCase() )
But then if potato tries to run it again within a minute, it would print a message in output that he is still on cooldown. I'm thinking of a JSON file that remembers the last time you executed that command and if you do it again it compares it to the time in the JSON file and if its longer then 1 minute it removes it from the JSON file but i seriously have no idea how to do that. So that's why im asking here!