Bulk fetching targeted/specific users #8034
Unanswered
Dubz
asked this question in
API Feature Requests & Ideas
Replies: 2 comments 4 replies
-
|
Have you tried Request Guild Members with the |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Where are you getting the user ids from? if the users are being provided in an interaction then Discord automatically resolves all of them for you. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am in need of an API to acquire specific users in a guild. Right now, the best approach is to fetch all users, however with guilds over 1k, this requires pagination and weighing which route is better.
I'd imagine this would still be restricted by privileged intents, if anything based on the count requested (i.e. <=5 fine, >5 required).
Example:
Say I need 7 specific users in a guild that has 8315 users. That's either 7 individually targeted user calls, or up to 9 pagination API calls (could stop early once all targets are found). Obviously I'd weigh counts and go with the less option, but if I could bring that down to 1 and specify those 7 specific users, that'd be much more useful for me.
Benefits:
My Requirements:
The only data I would need from these users, for my implementation (at this time), is their roles. This is used to calculate whether they can execute specific slash commands (end goal). While an API to calculate this and return the overall true/false would likely be easier for me, I'm sure it adds a lot more complexity to implement on Discord, and a lot less likely to be used by others. I'd be happy to leverage it as an alternative though. I'm sure I'm not the only one who would benefit from this targeted users feature.
For reference, a "get members with role" would not help for my case. I know it doesn't exist, but in case it was thought of.
Beta Was this translation helpful? Give feedback.
All reactions