Error is null when fetching recommended shard count
I am trying to start up my bot and when I fetch the recommended shard count it always fails, however, when it does fail, the error object is always empty. Could this be because I am rate limited or is there another issue? This has been happening for a few days, but seems to only effect some of my clusters.

12 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
The error happens here:

Just tested again, my bot runs on 3 different servers, this error is happening on the 1st server but not the second, with the exact same code
does discord rate limit by ip?
If this is a rate limit, I've been rate limited for a long time, at least 24 hours
sorry, forgot to clarify, it doesn't do much, kinda useless:

I do believe I figured out the issue, its an ip rate limit from cloudflare itself, discordjs isn't handiling the response correct so the error is null
I might open a PR to fix this if I get the chance
For clarity this is the headers I am getting back from cloudflare:

and the response text is this blob:

but with this being the important part:
<title>Access denied | discord.com used Cloudflare to restrict access</title>
like I said it really doesn't do anything:

just ceils it
dwag this literally is the discordjs function:

