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(Guild): setChannelPositions null parenting #5841

Merged
merged 1 commit into from Jun 13, 2021

Conversation

monbrey
Copy link
Member

@monbrey monbrey commented Jun 13, 2021

This fixes a couple of issues introduced in #5507 where not providing a parent to Guild#setChannelPositions would resolve to null, clearing the parent instead of leaving it unchanged.

This also prevented the method from being used to set more than one channel position, due to DiscordAPIError: Only one channel can have a parent_id modified at a time.

Additionally, the typings are updated to accept null in order to move the channel out of the parent category.

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
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.

Nice catch on the parenting issue ^^

@iCrawl iCrawl merged commit 01a1fd6 into discordjs:master Jun 13, 2021
@monbrey monbrey deleted the fix-set-channel-positions branch June 13, 2021 21:37
@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

5 participants