Posting a Webhook but CloudFlare Blocks with 1015

I am getting ratelimited for posting a webhook less than 1 time an hour. I was wondering if this may be caused by something else? It seems to just be on my project. I was hoping someone could help me.

Here is my discord file:

const MessageEmbed = require("/app/src/modules/embeds.js")
const request = require("request");

class discord {
  constructor(options = {}) {
    this.configuration = options;
    return this;
  }
  
  post_webhook(options = {}) {
    return new Promise(async(resolve, reject) => {
      if (options.error === false) {
        
        let embed = new MessageEmbed()
          .setColor("new_green")
          .setTimestamp()
          .addField("Message", options.message)
        
        request.post({
          url: this.configuration.webhook,
          json: {
            embeds: [ embed._apiTransform() ]
          },
          headers: {
            "Content-Type": "application/json"
          }
        }, async(error, response, body) => {
          if (error) return reject(error);
          return resolve();
        })
        
      } else if (options.error === true) {
        
        let embed = new MessageEmbed()
          .setColor("new_red")
          .setTimestamp()
          .addField("Error", options.message)
        
        request.post({
          url: this.configuration.webhook,
          json: {
            embeds: [ embed._apiTransform() ]
          }
        }, async(error, response, body) => {
          console.log(error, body);
          if (error) return reject(error);
          return resolve();
        })
        
      }
    });
  }
}

module.exports = discord

And when I fire post_webhook, it errors with this:

error code: 1015

I was hoping someone could shed some light on a possible solution.
Thanks, :slight_smile:

Is this consistent across a period of several days? Considering that the IP address changes sooner than every 12 hours, and that the IP address has a chance of being previously used by another discord bot project, the rate limiting could be a carry-over from the previous project.

Your site has a setting that tells cloudflare how long you can access the website without getting a new captcha, after solving one.


" Challenge Passage controls the cf_clearance cookie and is managed via the Settings tab of the Cloudflare Firewall app. A visitor is issued a new challenge when the configured Challenge Passage time expires."
So go to firewall and change the time it takes to get a new captcha.

I don’t have Cloudflare on my site. I’m not dealing with captchas in anyway whatsoever. Also, my backend is posting to https://discordapp.com, not receiving requests.

It’s been going on for at least 2 days. I finally decided to remix the project and that seemed to do the trick. I’m not sure how long this remix will last though. I’ll keep you posted.