Discord webhook requests being recieved late

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want to fix my webhooks being sent hours late.

  1. What is the issue? Include screenshots / videos if possible!

I send a request to my discord webhook every time a player chats, but it seems like it is in some sort of queue and the messages by the webhook keep being sent hours later.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I tried limiting the number of requests, it decreased the queue time, but I need every request in real time.

Here is the problem a bit clearer:
I send around 50-80 requests per minute every time a player chats, it works until a certain point where the webhook messages keep getting delayed. How do I fix this problem?

This is a terrible idea. If your game has semi-high traffic with people spamming or chatting really quickly and you log every single chat, your Discord account can get terminated.

I’m assuming your webhook is sending messages too quickly, therefore causing the delay

The Discord webhook rate limit is about 30 message/minute, I believe.

I saw somewhere that it’s 10,000 per minute.

You’re most likely being rate limited and your newer messages after you added a limit aren’t going through because you still have a queue.

Discord has also made it very clear that they do not want their webhook API to be used as a logging service. This kind of usage is resource intensive and forces Discord to spend more money on server hardware.

If you really have to log messages you should try finding other alternatives such as DataStores or other 3rd party logging services that are designed to handle heavy traffic.

What is the limit per minute? Also I’m using it for moderation.

Nevermind, just saw it was 30 requests per minute per channel. Thank you!

It doesn’t matter if you’re using it for moderation; you’re still logging an excessive amount of information in a short span of time.

This is against discord TOS and could result in your account being deleted for API abuse.