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

fix(RoleManager): fix ID return value, change return type to collection #4935

Merged
merged 4 commits into from Nov 22, 2020
Merged

fix(RoleManager): fix ID return value, change return type to collection #4935

merged 4 commits into from Nov 22, 2020

Conversation

vaporoxx
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged:

  1. When using RoleManager#fetch with a single ID, it tries to get the role from this.cache, however that won't work when cache is set to false and it will return null even when the role was fetched correctly. This has ben fixed by getting the role from the collection instead.

  2. Unlike any other manager, fetching without passing an ID returns the manager instead of the fetched collection, this has been changed for consistency.

Status

  • Code changes have been tested against the Discord API
  • I know how to update typings and have done so

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.

vaporoxx and others added 2 commits November 8, 2020 11:23
Co-authored-by: Ishmaam Khan <ishmaamk@gmail.com>
@iCrawl iCrawl merged commit 12a096b into discordjs:master Nov 22, 2020
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.

None yet

7 participants