Browse Source

Wrong property being used for Channels property

CategoryId is the category that "owns" this channel. That is actually impossible right now for category channels, so it returns null and get all channels wrongly.
pull/945/head
Paulo GitHub 7 years ago
parent
commit
1bbe5d53ae
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs

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

@@ -18,7 +18,7 @@ namespace Discord.WebSocket
=> throw new NotSupportedException();

public IReadOnlyCollection<SocketGuildChannel> Channels
=> Guild.Channels.Where(x => x.CategoryId == CategoryId).ToImmutableArray();
=> Guild.Channels.Where(x => x.CategoryId == Id).ToImmutableArray();

internal SocketCategoryChannel(DiscordSocketClient discord, ulong id, SocketGuild guild)
: base(discord, id, guild)


Loading…
Cancel
Save