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(ApplicationCommandManager): limit permission methods to guilds #5613

Merged
merged 5 commits into from May 22, 2021
Merged

fix(ApplicationCommandManager): limit permission methods to guilds #5613

merged 5 commits into from May 22, 2021

Conversation

vaporoxx
Copy link
Contributor

@vaporoxx vaporoxx commented May 11, 2021

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

These endpoints are not available for global commands.

Status and versioning classification:

  • I know how to update typings and have done so
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

Copy link
Member

@SpaceEEC SpaceEEC left a comment

Choose a reason for hiding this comment

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

Maybe also add a <warn>ing in the ApplicationCommand methods docstrings?

@advaith1
Copy link
Contributor

This method cannot be used on global application commands.

This is incorrect: global commands can have permissions, but the permissions must be set per-server

@vaporoxx
Copy link
Contributor Author

Yes, but that needs to be done through the manager, so saying "This method cannot be used" on the command class method is still correct

Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

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

src/errors/Messages.js Outdated Show resolved Hide resolved
@iCrawl iCrawl requested a review from kyranet May 11, 2021 20:35
src/errors/Messages.js Outdated Show resolved Hide resolved
@kyranet kyranet requested a review from vladfrangu May 11, 2021 22:05
@iCrawl iCrawl merged commit 03256bd into discordjs:master May 22, 2021
@vaporoxx vaporoxx deleted the fix-command-manager branch May 22, 2021 11:58
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
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

6 participants