Answers for "how-to-avoid-to-exceed-rate-limit-by-using-discord-js-api"

0

how-to-avoid-to-exceed-rate-limit-by-using-discord-js-api

client.fetchMessageRateLimits()
  .then(rateLimits => {
    for (rateLimit of rateLimits) {
      if (rateLimit.remaining === 0) {
        const msUntilReset = rateLimit.reset - Date.now();
        commandHandler.ignoreChannel(rateLimit.channelId, msUntilReset);
      }
    }
  });
Posted by: Guest on May-01-2021

Browse Popular Code Answers by Language