I don't know how to add cooldown in discord.js but only for 1 command, for example : /buy count: 100, if user call the command again will activate the cooldown, 'sorry you have to wait 5minute to execute this command again'
Can you help me to make a cooldown? Like the syntax and the position to place it
A simple way to set up cooldowns would be to store their user IDs in a set and remove it after 5 minutes. When the user ID is already in the set, you send the notification.
Note that this is a very simple implementation and the cooldowns would be reset if you restart your bot. If you don't want that you'll have to store it along with a timestamp in your database and check if it's been 5 minutes since.