cerus / jda-slash-commands

Slash commands (and message components) for JDA
GNU General Public License v3.0
15 stars 3 forks source link

Check for equalness #11

Closed PringlePot closed 3 years ago

PringlePot commented 3 years ago

Here's what i wanted, you get ratelimited after posting 5 - 6 commands in a minute or so.

cerus commented 3 years ago

Here's what i wanted, you get ratelimited after posting 5 - 6 commands in a minute or so.

Are you adding 5 commands every minute? o.0

PringlePot commented 3 years ago

Here's what i wanted, you get ratelimited after posting 5 - 6 commands in a minute or so.

Are you adding 5 commands every minute? o.0

I have 8 commands in my bot, they all get added on boot, so because the rate limit only the first 5 get added to the listeners

cerus commented 3 years ago

Retrieving all the registered commands when registering a new one is not really a great solution. A partial solution would be to retrieve and cache global commands on init. This way you can check using the cached collection instead of pulling the commands every time.

PringlePot commented 3 years ago

Could you check?

PringlePot commented 3 years ago

using join instead now

cerus commented 3 years ago

Is everything ready to merge?

PringlePot commented 3 years ago

Yeah should be