#I'm being ratelimited and I'm not sure what I can do.

1 messages · Page 1 of 1 (latest)

warm quiver
#

I run a pretty small bot, just on 4 small servers. I may have accidentally sent too many requests to a specific endpoint, and now I can't continue coding, because this error appears every time I suppose a command is registered:

[21:01:14] [ERROR] hikari.rest: rate limited on a shared sub bucket on bucket a3b974ef6eb1c925dd4ceb42f4db26fd. You should consider lowering the number of requests you make to 'PUT /applications/{application}/commands'. Backing off and retrying request...

This usually results in this error:
hikari.errors.RateLimitTooLongError: The request has been rejected, as you would be waiting for more than the max retry-after (300.0) on route 'PUT /applications/{id}/commands' [is_global=False]
Do I have to wait? How long is this usually? My bot's basically useless now because I was an idiot who purged all my application commands thinking that was efficient for cleanup.

oak mural
#

You probably got api banned for a while

#

what have you done

#

admit your sins

warm quiver
#

I basically just did await self.bot.rest.set_application_commands(self.application_id, []) on exit

#

Which probably wasn't a good idea because the person who showed me it warned me that could lead to something like this

#

I didn't heed them I guess

#

The bot can still go up, just that that endpoint seems to obviously not work, so I can't register new commands

#

It at least happened a little bit after I added it to my code after doing some other unrelated changes

oak mural
#

well

#

guess your best bet is to wait

#

also you should probably use a command handler that can properly sync commands for you

#

or implement command syncing yourself

warm quiver
#

Probably

#

how long does this usually last? I can guess it varies but I don't wanna wait long

oak mural
#

probably not longer than a day

warm quiver
#

Alright, i hope not

unborn inlet
#

@warm quiver I would greatly recommend against not doing that. Specially when you are developing, you will be restating your bot really often, leading to commands being reset too often

#

Also, if you ever setup permissions for the commands, they will be constantly lost with no way to get them back

warm quiver
#

Makes sense, I probably shouldn't anyways because I learned just a bit ago my command handled DOES handle commands for me

unborn inlet
#

:)