Disallow modifying the CategoryId for CategoryChannels #1282
+36
−18
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.