#Question: GUILD_PRESENCES rate limit

52 messages · Page 1 of 1 (latest)

noble vesselBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
twilit void
#

Question: GUILD_PRESENCES rate limit

vast oriole
#

No. Intents just are for receiving events

fallen flame
#

it however might slow your network down if you have bad connection. because that intents causes a lot of initial data and also a lot of emitted events

twilit void
#

@fallen flame @vast oriole Okay thanks for your answers, but there's something I can't understand, It was suggested me to remove the "GuildMessageReactions" intent because it was a bot restriction reason.
How is it possible that my bot is restricted, when I do not perform spam actions ?

vast oriole
#

who suggested that

#

Intents are for receiving eventd

#

Its what you do in those events that might get you ratelimited

twilit void
vast oriole
#

No

#

but how do you known you're ratelimited

twilit void
#

@vast oriole

#

Now i got code error: code 1015, with 1 day of restriction

fallen flame
twilit void
fallen flame
#

A node process.

#

Do you run more than one instance?

fallen flame
twilit void
twilit void
fallen flame
twilit void
#

@fallen flame

#

That ?

fallen flame
#

That is still only part of it. Copy all of it into a pastebin

nimble parcelBOT
#

To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.

twilit void
fallen flame
#

So you make raw requests with axios. Not djs related

#

Djs handles ratelimits for you. Axios is just a dumb http lib and can’t

#

Why do you use axios at all?

twilit void
#

its to check rate limit infos

fallen flame
#

You… hit the ratelimit because of those requests. Just listen to client.rest.on('rateLimited',…) if you want to know when you were about to hit a ratelimit. You don’t need to check yourself. That’s literally doing the opposite of what you want it to do

#

Discord.js queues requests if you would hit a ratelimit and wait until the ratelimit resets to then send the requests in the queue

twilit void
#

I am using

#

The event does not return an error

fallen flame
#

Sure. Because the requests of djs aren’t the cause of your ratelimit. Your custom ratelimit check is. Just remove that entirely, it doesn’t help you at all, it causes your issues

twilit void
#

To help you understand how I set up the system, the axios handleRateLimit request is in no way called via commandSlash or others, it's outside, I have an API running, I make a request via a web server to retrieve information to check if my bot is restricted or not but otherwise i don't use it.

fallen flame
#

Your comment literally says it does it every 5 minutes meguFace

twilit void
#

Its called there

#

with express App

fallen flame
#

And the issue is: each time you call that axios while being at the rateLimit it‘ll cause a 429. and those are the cause of your cloudflare ban you face

tight flint
fallen flame
# twilit void Its called there

You can just get that information from client.rest. Querying the API to find out if your rateLimited is a bad idea in itself.

twilit void
#

Is it possible to have a report of why the bot was blocked?

fallen flame
#

Do you do any other raw requests with axios or whatnot?

fallen flame
twilit void
twilit void
fallen flame
#

Huh? Why not? Stop using your axios and wait for the cloudflare ban to pass. They last an hour afaik