#maybe a bug on the request handler?
33 messages · Page 1 of 1 (latest)
maybe you are sending an editing those messages too fast?, iirc sending and editing messages share the same ratelimits
its not the message its the name of channel
BOT d.js docs:
Channel name and topic changes are limited to roughly 2 times per 10 minutes.
If your channel changes are not going through, this might be why.
i know but if the 429 status is the reponse of the request
then the ratelimit event should be triggerd but its not in my case
wym? 429 is the ratelimit?
yeah according to discord api
< Content-Type: application/json
< Retry-After: 1337
< X-RateLimit-Limit: 10
< X-RateLimit-Remaining: 9
< X-RateLimit-Reset: 1470173023.123
< X-RateLimit-Reset-After: 64.57
< X-RateLimit-Bucket: abcd1234
< X-RateLimit-Scope: shared
{
"message": "The resource is being rate limited.",
"retry_after": 1336.57,
"global": false
}```
Ah!! I'm so sorry.
the https://discord.js.org/#/docs/discord.js/13.8.1/class/Client?scrollTo=e-rateLimit
client.on("rateLimit"
Don't know why it's not emitted - will let someone else reply.
ahh you are right sorry i read that incorrectly
to listen for ratelimits on @dev iirc you have to listen on client.rest.on("rateLimited", console.log) event
I know I have that already
It doesn't seem to fire for 429, when doing channel name edits on 13.8.0 either
yeah i didn't see that till last night i got my bot host server ip banned
and decided to log every request
"IP addresses that make too many invalid HTTP requests are automatically and temporarily restricted from accessing the Discord API. Currently, this limit is 10,000 per 10 minutes"
429 responses are avoided by inspecting the rate limit headers documented above and by not making requests on exhausted buckets until after they have reset. 429 errors returned with X-RateLimit-Scope: shared are not counted against you
editing channel names is one of those, you can't account for another bot draining the ratelimit bucket
It was apparently not about the ratelimiting itself, it was about the Client#rateLimit event not firing
yeah i know that but as torriz said its about the event
Ur prob editing channel names
Discord has a sub-limit specifically for bots when performing said action
How to see this sub-limit and why the rate limit event didn't get triggered
Can you check if the sublimit appears when using the debug event?
I'm just checking the response headers and logging them
The debug event should say Hit a 429 while executing a request … Sublimit: 123ms
Okay I see that but why the rate limit event didn't get triggered
I think I see the issue
That sleep would make it so that the request is no longer rate limited, which caused the while loop that emits the rateLimit event to not run
Yeah so it's a bug on the request handler
Yea
It need to be fixed