Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow async iterators in delete_messages #1127

Closed
thesadru opened this issue Apr 9, 2022 · 0 comments · Fixed by #1134
Closed

Allow async iterators in delete_messages #1127

thesadru opened this issue Apr 9, 2022 · 0 comments · Fixed by #1134
Labels
enhancement New feature or request

Comments

@thesadru
Copy link
Contributor

thesadru commented Apr 9, 2022

Summary

rest.delete_messages should allow the use of both sync and async/lazy iterators.

Why is this needed?

Users should not be forced to chunk iterators themselves if they want to delete and fetch the history at the same time.

Ideal implementation

Instead of having a list of pending messages, it would be better to cast the iterable into a LazyIterator and use iterator.chunk(). While this may reduce the performance by a few nanoseconds it will improve user experience.

@thesadru thesadru added the enhancement New feature or request label Apr 9, 2022
thesadru added a commit to thesadru/hikari that referenced this issue Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant