-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(Client): AsyncIterator-returning method for fetching members #9771
feat(Client): AsyncIterator-returning method for fetching members #9771
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://discord-js-guide-git-fork-almeidx-core-request-2a2622-discordjs.vercel.app/ |
This comment was marked as duplicate.
This comment was marked as duplicate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also change the tsdoc for requestGuildMembersIterator
to clarify it's a method that returns batches, preferably with an @example
as well.
ed7b955
to
c143250
Compare
c143250
to
66e733c
Compare
Please describe the changes this PR makes and why it should be merged:
Resolves #9017
Not sure what to name the new method, open to suggestions
🤖 Generated by Copilot at 15465c6
Summary
✨♻️📚
Added a new way to fetch guild members data using an async iterator. Improved the existing method to use the new iterator. Changed
packages/core/src/client.ts
.Walkthrough
requestGuildMembersIterator
method toClient
class to return an async iterator for guild members data (link, link)requestGuildMembers
method to userequestGuildMembersIterator
internally and collect the data into a promise (link)on
andclearTimeout
functions fromnode:events
andnode:timers
modules forrequestGuildMembersIterator
(link)Status and versioning classification: