Skip to content

feat: Server#query_members#456

Closed
Droid00000 wants to merge 1 commit into
shardlab:mainfrom
Droid00000:feat/query-members-by-id
Closed

feat: Server#query_members#456
Droid00000 wants to merge 1 commit into
shardlab:mainfrom
Droid00000:feat/query-members-by-id

Conversation

@Droid00000

Copy link
Copy Markdown
Collaborator

Summary

This PR adds a#query_members method to allow you to get multiple members by user ID in one go. It uses the REQUEST_GUILD_MEMBERS opcode with the user_ids parameter to do this. Example usage:

ids = DB[:some_table].where { age > 12 }.all

result = event.server.query_members(ids: ids.map { it[:id] }) # => QueriedMembers

Added

Server#query_members
Discordrb::QueriedMembers

Changed

Pass the nonce and not_found data from the chunk to Server#process_chunk so the code can tell the difference between query requests, and when we are chunking the entire members list.

@Droid00000 Droid00000 requested a review from swarley May 16, 2026 20:58
@Droid00000 Droid00000 force-pushed the feat/query-members-by-id branch from 2443f3c to 180f2ac Compare May 16, 2026 21:14
@Droid00000 Droid00000 marked this pull request as draft May 24, 2026 21:01
@Droid00000

Copy link
Copy Markdown
Collaborator Author

Should be superseded by #458.

@Droid00000 Droid00000 closed this Jun 7, 2026
@Droid00000 Droid00000 deleted the feat/query-members-by-id branch June 7, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant