Annoyed with Discord banning you for exceeding webhook rate limits? Sick of rate limits in general? No problem! Limiter is a module that takes care of rate limits for you using a queue.
Documentation
Limiter:SetRateLimit(rt: number)
rt
- Maximum amount of functions that will be executed and leave the queue per minute (Defaults to 5)Limiter:Add(misc, ...)
misc
- Can be a string or a functionIf
misc
is a function, you would use it like this:Limiter:Add(function()
print('hi')
end)
If misc
is a string, you can choose from one of the available ids:
-
d_webhook
- For creating a discord webhook
Example Usage:
Limiter:Add("d_webhook", "webhook_url", "messagetosend")
Limiter:Activate()
Begins running the queue and fires the Limiter.Activated
event.
Limiter:Deactivate()
Stops running the queue and fires the Limiter.Deactivated
event.
Limiter.Activated
Fired when Limiter:Activate()
is called. No parameters.
Limiter.Deactivated
Fired when Limiter:Deactivate()
is called. No parameters.
Limiter.Added
Fired when Limiter:Add()
is called. No parameters.
Thanks for reading!