if (talkedRecently.has(message.author.id)) {returnmessage.channel.send("`5` Saniye de Bir Kullanabilirsin - "+message.author); } else {// the user can type the command ... your command code goes here :)// Adds the user to the set so that they can't talk for a minutetalkedRecently.add(message.author.id);setTimeout(() => {message.delete();// Removes the user from the set after a minutetalkedRecently.delete(message.author.id); },5000);// Şuan 5 Saniyedir Değiştirebilirsiniz. }
exports.run Altına koyun. const talkedRecently = new Set(); Üst kısmına bunu ekleyiniz.
Tüm komutlara yapmak yerine aşşağıdakini kullanabilirsiniz:
if(cmd) {constdb=require('quick.db')constannen=awaitdb.fetch(`asd.${message.author.id}`)if(annen) returnmessage.channel.send(`Bir komut daha kullanabilmek için 3 saniye beklemelisin.`)if(!annen) {db.set(`asd.${message.author.id}`,'as')}setTimeout(async () => {db.delete(`asd.${message.author.id}`) },3000) }