JOIN ratelimit questions

So, ive been recently stress testing my library cache and been encountering this issue


Now, ive recently changed the handler to this

which occasionally still yields a chat timeout error;
My question is, is there a way to request my current ratelimits?
While the question itself is dumb, heres the reason i ask it

The timestamp provided by the ratelimit-reset returns the SAME timestamp as the request that was sent, not the actual reset timestamp when the bucket/rate-limit resets.
Ive asked for an increase on my ratelimits already(which hopefully soon come) as the startup of my bot gets join timeouts ocasionally due to it passing the 20 JOIN attemps per 10 seconds

So is there an enpoint i can touch(and which) to retrieve my actual ratelimit? (the ratelimit shown above is for the /streams endpoint, the one im looking for is the JOIN ones)

You screenshot for 799/800/timestamp is for Helix API rate limits. And the use/refresh limits are a bucket so since you made one request that is insta refilled, you’ll only notice timestamp change/mismatch to current if you hammer the endpoint really.

And of course helix rate limits are not related to the IRC Join limits and work in a different way, you are comparing apples to oranges

There is no endpoint that provides the IRC Rate limit “state”.

Have you checked your code is working how you think it’s working?

Yeah, the code loop is working fine, even with the increased delay it still throws a join timeout every now and again. My only other assumption is the library reconnecting or something in the background which is adding unwanted counts ontop of my loop. Hence why i already requested a verification of the bot to increase the limits, when this is specially a bothersome on startup(which sometimes hits rate limit and makes the bot be ‘off’ for 30 minutes).

For reference, the loop is waiting 1500 ms per iteration,and ontop of that,on the 19th attempt it waits 11000 ms. That still encountering issues

if you are familiar with Typescript/Javascript, this is the gist of the code im running:

let channels = ['insert 100+ channel names here'];
const delay = (ms: number) => new Promise((res) => setTimeout(res, ms));
let count = 0;
for(let c of channels) {
if(count >= 19) {await delay(11000);count = 0;}
count++
await chat.join(c);
await delay(1500)
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.