JaredScar / Badger_Discord_API

A FiveM API Script [created by Badger]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

REOPEN: Rate limit issue

Dennis-NL opened this issue · comments

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

Rate limit does not work. Atleas not with 200 players.
Continously erroring in the console, players not getting their roles etc (Only using Badger Discord perms and API)

Stop being ignorant, the script does not work correctly with high player counts

I send too many requests to the Discord API?... You do realize that this is an API script which means that the calls are by other scripts. This script makes no calls other than making sure the API is connected to the bot correctly. If you are using a resource like DiscordAcePerms, it could be possible you're hitting a rate limit from 200 players joining too quickly, but there would be no real fixing to that unless some sort of queue was implemented to account to prevent the rate limit, but this wouldn't work either because some scripts require the permissions be implemented before a player loads into the server.

Every time a player joins with DiscordAcePerms, an API call is made to get their roles and compares it to the roles in the configuration files you set up. Provide your configuration files and I'm sure there is optimizations you're missing out on...

The rate limit does work. It's working as intended. The rate limit is implemented by Discord. Your comment lacks clear understanding of what the rate limit is.