Bulk Role Management and Role Member Fetching Endpoints #7329
Unanswered
Lixqa
asked this question in
API Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’d like to suggest a few new API endpoints to improve role management and member fetching in (large) guilds.
Bulk Role Management
A new endpoint for bulk assigning/removing roles to multiple members at once with bots.
Example:
POST /guilds/:guildId/roles/:roleId/members/bulk
DELETE /guilds/:guildId/roles/:roleId/members/bulk
Fetch Members by Role
An endpoint to retrieve all members with a specific role.
Example:
GET /guilds/:guildId/roles/:roleId/members
or at least their IDs like:
GET /guilds/:guildId/roles/:roleId/members/ids
Fetch Member Counts
GET /guilds/:guildId/roles/member-counts
Why It’s Needed
Scalability: Fetching and filtering all guild members is inefficient for large guilds (e.g., 500k+ members).
Rate Limits: Bulk operations like role assignments currently hit rate limits when done individually.
Current Situation
I am a developer on a server with 500,000 members. We have numerous role-related features and roles with thousands of members. We also perform many role-assigning and other mass operations. Currently, we loop through approximately 20,000 members to assign or remove a role each day. This process takes several hours, leading to problems and disrupting the community experience.
Fetching data is even more problematic. We must first retrieve all 500,000 members and then filter them to obtain a list of members with a specific role, even if there are only 20 members with that role.
Currently, the following similar endpoints are available for users only:
GET /guilds/:guildId/roles/member-counts
GET /guilds/:guildId/roles/:roleId/member-ids
These new endpoints would help streamline role management for large servers, improving both performance and ease of use.
Beta Was this translation helpful? Give feedback.
All reactions