refactor(GuildChannel): rework setting parent and permission locking #4598
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please describe the changes this PR makes and why it should be merged:
lock_permissions,set_parentin (chore: document missing properties in Modify Channel Positions endpoint discord/discord-api-docs#1776)lock_permissionsinPATCH/channels/{channel.id}(Request: Add lock_permissions to PATCH/channels/{channel.id} discord/discord-api-docs#3264)After some more digging brought up after #4144 this has turned out to be much more of an issue and less of an easy fix as originally assumed. I'll submit this as a draft PR so it can be referenced.
⚠This PR will be subject to heavy changes as more information is acquired!
Current checklist/required information:
lock_permissionsin above endpoint (chore: document missing properties in Modify Channel Positions endpoint discord/discord-api-docs#1776)set_parentin above endpoint (chore: document missing properties in Modify Channel Positions endpoint discord/discord-api-docs#1776)lock_permissionsin PATCH/channels/{channel.id} (Request: Add lock_permissions to PATCH/channels/{channel.id} discord/discord-api-docs#1796)Changes:
Guild#setChannelPositionsallow and properly handle parent and lock optionsGuild#setChannelPositionsmake position optional (while this could be argued as major, it really just fixes the behavior to reflect the actual behavior of the API)Alternatives:
Original Issue
The original hacky fix has been moved into #4627 to allow acting faster than the above linked documentation request, should the need arise.
Status
Semantic versioning classification: