Disallow modifying the CategoryId for CategoryChannels#1282
Open
Chris-Johnston wants to merge 2 commits intodiscord-net:devfrom
Open
Disallow modifying the CategoryId for CategoryChannels#1282Chris-Johnston wants to merge 2 commits intodiscord-net:devfrom
Chris-Johnston wants to merge 2 commits intodiscord-net:devfrom
Conversation
This change fixes an issue that was introduced with the INestedChannel type. Previously, it was possible to use ModifyAsync on a ChannelCategory to set it's CategoryId. This is not supported, and would probably error. This is a breaking change, however I can't imagine that anyone was trying to nest categories before this. I don't think that it should affect anyone. This change adds the NestedChannelProperties and ModifyNestedChannelParams types, which follow the same class hierarchy as the public-facing channel entities. This allows only guild voice and text channels to be placed under a category. The change
setting a categoryid to 0 will result in a bad request, null will actually detach
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change fixes an issue that was introduced with the INestedChannel type ( #1004 ). Previously, it was possible to use ModifyAsync on a ChannelCategory to set it's CategoryId, since it was just using GuildChannelProperties. This is not supported by the API, and would probably do nothing.
This is a breaking change, however I can't imagine that anyone was trying to nest categories before this. I don't think that it should affect anyone. (Prove me wrong, I guess?)
This change adds the NestedChannelProperties and ModifyNestedChannelParams types, which follow the same class hierarchy as the public-facing channel entities. This allows only guild voice and text channels to modify the CategoryId property.