Skip to content
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(GuildMemberManager): add 'search' method #4154

Merged
merged 5 commits into from
Apr 14, 2021

Conversation

izexi
Copy link
Contributor

@izexi izexi commented May 3, 2020

Ref: discord/discord-api-docs#1577
This PR will be marked as draft until the referenced PR above has been merged.

Status

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

src/managers/GuildMemberManager.js Outdated Show resolved Hide resolved
@advaith1
Copy link
Contributor

This is basically just a duplicate of GuildMemberManager#fetch but over REST; is it necessary?

@vladfrangu
Copy link
Member

Yes, for API coverage 😄

@advaith1
Copy link
Contributor

I don't think discord.js supports the List Guild Members endpoint though?, because that can also be done through #fetch which uses the gateway. IMO it's pointless to have two methods that do the same thing but in different ways, as that's likely to confuse users and leads to unnecessary bloat.

@vladfrangu
Copy link
Member

Fair, we don't support all endpoints yet, however it doesn't mean we shouldn't support both... This would he especially beneficial for anyone that uses d.js in a more stateless manner (if they manage that) as well!

As for user confusion... Documentation can clarify that .fetch can* include presences too (via intent and option, as well as fetching specific user IDs, while the rest endpoint lets you just search by start of nickname/username)

That's just my opinion tho 👍

@izexi izexi marked this pull request as ready for review April 7, 2021 18:10
@izexi
Copy link
Contributor Author

izexi commented Apr 7, 2021

The referenced PR has finally been merged

@iCrawl iCrawl merged commit 0ba2bcb into discordjs:master Apr 14, 2021
@izexi izexi deleted the GuildMemberManager-search branch April 14, 2021 13:02
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.

9 participants