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(ApplicationCommand): add setX methods for easier editing #7063

Merged
merged 2 commits into from Dec 7, 2021

Conversation

ImRodry
Copy link
Contributor

@ImRodry ImRodry commented Dec 5, 2021

Please describe the changes this PR makes and why it should be merged:
This PR adds 4 new methods to ApplicationCommand to make it easier to edit them. These are setName, setDescription, setDefaultPermission and setOptions. Although the edit method says that type conversions are supported, this does not seem to be the case when testing with the API so I decided not to add a setType method.

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)

Copy link
Contributor

@ceilingfans ceilingfans left a comment

Choose a reason for hiding this comment

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

Looks good to me

src/structures/ApplicationCommand.js Outdated Show resolved Hide resolved
Co-authored-by: awned <65061212+ceilingfans@users.noreply.github.com>
typings/index.d.ts Show resolved Hide resolved
Copy link

@mafineeek mafineeek left a comment

Choose a reason for hiding this comment

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

good

@iCrawl iCrawl modified the milestones: Version 13.x, Version 13.4 Dec 7, 2021
@iCrawl iCrawl merged commit 7f980e3 into discordjs:main Dec 7, 2021
@ImRodry ImRodry deleted the feat-edit-command-props branch December 8, 2021 13:02
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