disnake icon indicating copy to clipboard operation
disnake copied to clipboard

feat: configurable max wait time for ratelimits

Open onerandomusername opened this issue 3 years ago • 4 comments

Summary

closes #449

This adds a max_ratelimit_wait kwarg to the client creation which will raise a RatelimitTooLong exception on any endpoint if the time to wait would be too long.

Checklist

  • [x] If code changes were made, then they have been tested
    • [x] I have updated the documentation to reflect the changes
    • [x] I have formatted the code properly by running task lint
    • [x] I have type-checked the code by running task pyright
  • [x] This PR fixes an issue
  • [x] This PR adds something new (e.g. new method or parameters)
  • [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • [ ] This PR is not a code change (e.g. documentation, README, ...)

onerandomusername avatar Apr 08 '22 20:04 onerandomusername

Postponing this to 2.6 to leave time for further testing

onerandomusername avatar Apr 14 '22 21:04 onerandomusername

This requires a lot more work, due to the http handling essentially being duplicated in webhook/async_.py

onerandomusername avatar Apr 15 '22 23:04 onerandomusername

This requires a lot more work, due to the http handling essentially being duplicated in webhook/async_.py

From what I can tell, the purpose of this is to avoid exceptionally large ratelimits (emojis, stickers, member edits, ...), none of which are expected to occur in webhook requests. Only implementing this for the core http module seems perfectly fine.

shiftinv avatar Jul 26 '22 15:07 shiftinv

Deferred until a complete ratelimit refactor can be done.

onerandomusername avatar Aug 27 '22 02:08 onerandomusername