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: add methods to managers #7300

Merged
merged 1 commit into from Feb 9, 2022
Merged

Conversation

ImRodry
Copy link
Contributor

@ImRodry ImRodry commented Jan 18, 2022

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

This PR adds a bunch of methods to managers (without any intention to remove them from the structures of course). For some of these I had to use resolve instead of resolveId due to how the code works so if you believe this defeats the purpose of a manager method I can try refactoring or undoing some of those changes. This PR sort of continues the work from #7286

Status and versioning classification:

  • 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
  • This PR changes the library's interface (methods or parameters added)

packages/discord.js/src/managers/GuildChannelManager.js Outdated Show resolved Hide resolved
packages/discord.js/src/managers/GuildChannelManager.js Outdated Show resolved Hide resolved
packages/discord.js/src/managers/RoleManager.js Outdated Show resolved Hide resolved
packages/discord.js/typings/index.d.ts Outdated Show resolved Hide resolved
@ImRodry
Copy link
Contributor Author

ImRodry commented Jan 19, 2022

@iCrawl This should be semver minor, not major ?

Copy link
Member

@kyranet kyranet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some refactors and tweaks.

Furthermore, replace all usages of client.api with the new client.rest now that the REST PR has landed.

packages/discord.js/src/managers/GuildChannelManager.js Outdated Show resolved Hide resolved
packages/discord.js/src/managers/GuildChannelManager.js Outdated Show resolved Hide resolved
packages/discord.js/src/managers/GuildChannelManager.js Outdated Show resolved Hide resolved
packages/discord.js/src/managers/GuildEmojiManager.js Outdated Show resolved Hide resolved
packages/discord.js/src/structures/GuildChannel.js Outdated Show resolved Hide resolved
@ImRodry
Copy link
Contributor Author

ImRodry commented Jan 26, 2022

Rebased and applied all suggestions!

Copy link
Member

@kyranet kyranet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just 3 more things, then LGTM.

packages/discord.js/src/managers/GuildChannelManager.js Outdated Show resolved Hide resolved
packages/discord.js/src/managers/GuildChannelManager.js Outdated Show resolved Hide resolved
packages/discord.js/src/managers/GuildChannelManager.js Outdated Show resolved Hide resolved
@ImRodry ImRodry force-pushed the feat-manager-methods branch 2 times, most recently from b9c2667 to 10c2eea Compare January 28, 2022 18:48
Co-Authored-By: Parbez <imranbarbhuiya.fsd@gmail.com>
Co-Authored-By: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
Co-Authored-By: Antonio Román <kyradiscord@gmail.com>
@iCrawl iCrawl merged commit dd751ae into discordjs:main Feb 9, 2022
@ImRodry ImRodry deleted the feat-manager-methods branch February 9, 2022 09:06
ImRodry added a commit to ImRodry/discord.js that referenced this pull request Mar 6, 2022
Co-authored-by: Parbez <imranbarbhuiya.fsd@gmail.com>
Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants