From 1bbe5d53ae0850d472b0e57d4740f894641337cf Mon Sep 17 00:00:00 2001 From: Paulo Date: Tue, 30 Jan 2018 16:29:47 -0200 Subject: [PATCH] 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. --- .../Entities/Channels/SocketCategoryChannel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs index 27e171c1f..7d6515e66 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs @@ -18,7 +18,7 @@ namespace Discord.WebSocket => throw new NotSupportedException(); public IReadOnlyCollection 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)