Add option in the configuration to adjust the interval of the join rate. 2000ms is a safe default value but it could be faster. The actual rate limit is 50 JOINs per 15s which is every 300ms. The library is using a longer interval to avoid colliding with JOINs called from outside the queue.
This option should go in the options section of the configuration. The option should be named something short but specific like joinInterval. When the queue is created, the value should be validated that it can be parsed as a number, otherwise continue using the default 2000. It should be constrained to a minimum of 300.
Add option in the configuration to adjust the interval of the join rate. 2000ms is a safe default value but it could be faster. The actual rate limit is 50 JOINs per 15s which is every 300ms. The library is using a longer interval to avoid colliding with JOINs called from outside the queue.
https://github.com/tmijs/tmi.js/blob/92d7ccff8cecf33bc28c1f40612228e01943a4ff/lib/client.js#L177
This option should go in the
options
section of the configuration. The option should be named something short but specific likejoinInterval
. When the queue is created, the value should be validated that it can be parsed as a number, otherwise continue using the default 2000. It should be constrained to a minimum of 300.Other improvements could be a smarter queue that detects the current JOIN rate to avoid clashing with joins called from outside the interval.