From 41ed9106f2b05530acbf06b245c9aa618011d815 Mon Sep 17 00:00:00 2001 From: mrspits4ever Date: Thu, 14 Dec 2017 20:02:57 +0100 Subject: [PATCH] removed mentioning support for RestCategoryChannel, added channels property to SocketCategoryChannel --- src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs | 2 -- .../Entities/Channels/SocketCategoryChannel.cs | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs index f0140ed9e..397e14e76 100644 --- a/src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs +++ b/src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs @@ -11,8 +11,6 @@ namespace Discord.Rest [DebuggerDisplay(@"{DebuggerDisplay,nq}")] public class RestCategoryChannel : RestGuildChannel, ICategoryChannel { - public string Mention => MentionUtils.MentionChannel(Id); - internal RestCategoryChannel(BaseDiscordClient discord, IGuild guild, ulong id) : base(discord, guild, id) { diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs index 905b219d8..d5a183b1e 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs @@ -17,6 +17,9 @@ namespace Discord.WebSocket public override IReadOnlyCollection Users => Guild.Users.Where(x => x.VoiceChannel?.Id == Id).ToImmutableArray(); + public IReadOnlyCollection Channels + => Guild.Channels.Where(x => x.CategoryId == CategoryId).ToImmutableArray(); + internal SocketCategoryChannel(DiscordSocketClient discord, ulong id, SocketGuild guild) : base(discord, id, guild) {