JaredScar / Badger_Discord_API

A FiveM API Script [created by Badger]
MIT License
56 stars 48 forks source link

Discord rate limit #41

Closed Dennis-NL closed 1 year ago

Dennis-NL commented 1 year ago

Badger sends to many requests to the Discord API resulting in a rate limit.

script:Badger_Discor] [Badger_Perms] ERROR: Code 200 was not reached... Returning false. [Member Data NOT FOUND] DETAILS: Error - Too many requests, you hit the Discord rate limit. https://discord.com/developers/docs/topics/rate-limits

gegelendvay commented 1 year ago

If you are using the built-in caching system, there shouldn't be a reason for this resource to hit the Discord request limit. However, excessive calling of a function from another script, with a loop for example, might trigger it.

Dennis-NL commented 1 year ago

I'm using DiscordACEperms. Everytime someone joins the server it start checking the roles. Thus hitting the rate limit

JaredScar commented 1 year ago

How is this an issue? You hitting the rate limit is not a valid issue. This resource implements caching for a reason. Utilize it.

Dennis-NL commented 1 year ago

Rate limit does not work. Atleas not with 200 players. Continously erroring in the console, players not getting their roles etc