title: setTimeout for client using command
body: <p>So what I'm trying to do is create a "cooldown" like system for my discord bot, I've tried using a database method, <a href="https://stackoverflow.com/questions/38183781/how-to-modify-each-json-object-javascript/38183820">here</a> which doesn't work for me.</p>
  
  <p>I'm using the discord.js package.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>if (msg.content.startsWith("!point")) {
    var usr = msg.content.split(" ").slice(1).join(" ");
    if (!usr) {
      bot.sendMessage(msg, "```Error: 1\n Reason: Please state a name.```");
      return;
    }
    if (usr == msg.author.username) {
      bot.sendMessage(msg, "```Error: 3\n Reason: You're unable to point yourself.```");
      return;
    }
    if (!db["users"][usr]) {
      db["users"][usr] = 0;
    }
    console.log(usr + " has " + db["users"][usr]);
    db["users"][usr] += 1;
    console.log(usr + " now has " + db["users"][usr]);
    fs.writeFileSync('database.json', JSON.stringify(db));
    bot.sendMessage(msg, usr + " has received 1 point");
  }
  </code></pre>