Queuing requests for Discord webhook rate limiting

I know that you can use RequestAsync to rate limit requests with a header.

However, how can I create a queue system when the limit reaches? Basically, when a spot is opened, I look from the queue order. But I also want to make sure the queue runs when an entry is available.

I’ve attempted an event-based approach for checking when to run the queue (wait for entry) with an infinite spawned loop (coroutine.wrap()) without success.

What’s the best way to go about webhook message request queuing?

Use Discord webhook with roblox is a bad idea but yes i tink is possible

know that your Discord account can be deleted or temporarily deactivated if you spam them too much webhook

no bro u can use a header to prevent spam cuz discord tell u with requestasync