diff --git a/src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs index bfcfa1a92..bfdf1f6c0 100644 --- a/src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs +++ b/src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs @@ -25,8 +25,17 @@ namespace Discord.Rest private string DebuggerDisplay => $"{Name} ({Id}, Category)"; // IGuildChannel + + /// + /// Throws a NotSupportedException because Channel Categories cannot be the child of another Channel Category. + /// + /// A NotSupportedException is always thrown because Channel Categories do not support being nested. ulong? IGuildChannel.CategoryId => throw new NotSupportedException(); + /// + /// Throws a NotSupportedException because Channel Categories cannot be the child of another Channel Category. + /// + /// A NotSupportedException is always thrown because Channel Categories do not support being nested. Task IGuildChannel.GetCategoryAsync() => throw new NotSupportedException(); IAsyncEnumerable> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options) diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs index 384620d22..e53273ec9 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs @@ -51,8 +51,17 @@ namespace Discord.WebSocket internal new SocketCategoryChannel Clone() => MemberwiseClone() as SocketCategoryChannel; // IGuildChannel + + /// + /// Throws a NotSupportedException because Channel Categories cannot be the child of another Channel Category. + /// + /// A NotSupportedException is always thrown because Channel Categories do not support being nested. ulong? IGuildChannel.CategoryId => throw new NotSupportedException(); + /// + /// Throws a NotSupportedException because Channel Categories cannot be the child of another Channel Category. + /// + /// A NotSupportedException is always thrown because Channel Categories do not support being nested. Task IGuildChannel.GetCategoryAsync() => throw new NotSupportedException(); IAsyncEnumerable> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options)