Browse Source

Add throw for GetCategoryAsync

pull/1004/head
Chris Johnston 8 years ago
parent
commit
6ca9632a62
2 changed files with 4 additions and 0 deletions
  1. +2
    -0
      src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs
  2. +2
    -0
      src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs

+ 2
- 0
src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs View File

@@ -27,6 +27,8 @@ namespace Discord.Rest
// IGuildChannel // IGuildChannel
ulong? IGuildChannel.CategoryId ulong? IGuildChannel.CategoryId
=> throw new NotSupportedException(); => throw new NotSupportedException();
Task<ICategoryChannel> IGuildChannel.GetCategoryAsync()
=> throw new NotSupportedException();
IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options) IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
=> throw new NotSupportedException(); => throw new NotSupportedException();
Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)


+ 2
- 0
src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs View File

@@ -53,6 +53,8 @@ namespace Discord.WebSocket
// IGuildChannel // IGuildChannel
ulong? IGuildChannel.CategoryId ulong? IGuildChannel.CategoryId
=> throw new NotSupportedException(); => throw new NotSupportedException();
Task<ICategoryChannel> IGuildChannel.GetCategoryAsync()
=> throw new NotSupportedException();
IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options) IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
=> ImmutableArray.Create<IReadOnlyCollection<IGuildUser>>(Users).ToAsyncEnumerable(); => ImmutableArray.Create<IReadOnlyCollection<IGuildUser>>(Users).ToAsyncEnumerable();
Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)


Loading…
Cancel
Save