-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
feat(RoleManager): add fetchMemberCounts
#11352
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
📝 WalkthroughWalkthroughAdds a new public method Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)packages/discord.js/typings/index.d.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (2)
Comment |
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.
Pull request overview
This PR integrates a new Discord API endpoint into the RoleManager class by adding a fetchMemberCounts() method that retrieves the number of members for each role in a guild. This implementation follows the upstream Discord API documentation update (PR #8025).
Key Changes
- Added
fetchMemberCounts()method to fetch role member counts from the Discord API - TypeScript type definitions updated to include the new method signature
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/discord.js/typings/index.d.ts | Added TypeScript type definition for the new fetchMemberCounts() method returning a Promise of a Collection mapping Snowflake role IDs to numbers |
| packages/discord.js/src/managers/RoleManager.js | Implemented fetchMemberCounts() method that calls the new Discord API endpoint and transforms the response into a Collection |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Integrates the new endpoint into the
RoleManagerUpstream: