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

GuildMemberRoleManager typings incorrectly inherit from BaseManager #5009

Closed
1 task
MitchTalmadge opened this issue Nov 14, 2020 · 1 comment
Closed
1 task

Comments

@MitchTalmadge
Copy link

Please describe the problem you are having in as much detail as possible:
In index.d.ts, GuildMemberRoleManager inherits from OverridableManager, which inherits from BaseManager, which implements functions such as resolve and resolveID. This causes these functions to be suggested while writing TypeScript bots. However, the definition does not appear to inherit from anything, and in fact an error is thrown if the BaseManager methods are used:

TypeError: discordMember.roles.resolve is not a function

Include a reproducible code sample here, if possible:

Reproducing this is simple. Just get a GuildMember and name it discordMember. Begin typing discordMember.roles. and the following suggestions will appear:

image

As you can see, many of them are invalid. If you try to use a BaseManager method, it will throw an error at runtime.

Further details:

  • discord.js version: 12.4.1
  • Node.js version: 15.2.0
  • Operating system: Windows 10
  • Priority this issue should have – please be realistic and elaborate if possible: Low, just an annoyance

Relevant client options:

  • partials: N/A
  • gateway intents: N/A
  • other: N/A
  • I have also tested the issue on latest master, commit hash:
@SpaceEEC
Copy link
Member

This has been fixed with #5497. 🎉

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants