corde
corde copied to clipboard
[Request] Add configurable delay for each check
Is your feature request related to a problem? Please describe. My bot has rate limiting implemented and Corde runs command checks too quickly, which ends up being rate limited:
Describe the solution you'd like
A global configurable delay for sending individual commands and potentially a per-command parameter (like timeout
).
Describe alternatives you've considered ~~Maybe this would work? I haven't tested it yet.~~ Nope, I just tested it and all it does is hang for a long time before executing all the commands without any delay between them.
Hi, again @HeCorr. This is really helpful. Thank you for the suggestion. The code that you just showed does not work because corde adds each expect
call into a queue that basically ignores all the rest of the code inside the test
statement '-' (I know, it is terrible. I'm working on it).
Don't worry about it. :)
Most smaller bots don't have rate limiting implemented so it makes sense that such feature hasn't been requested yet.
I would try writing a PR for this but I'm busy at the moment and honestly rather rusty with Typescript.
Thanks!