Browse Source

removed mentioning support for RestCategoryChannel, added channels property to SocketCategoryChannel

pull/907/head
mrspits4ever 7 years ago
parent
commit
41ed9106f2
2 changed files with 3 additions and 2 deletions
  1. +0
    -2
      src/Discord.Net.Rest/Entities/Channels/RestCategoryChannel.cs
  2. +3
    -0
      src/Discord.Net.WebSocket/Entities/Channels/SocketCategoryChannel.cs

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

@@ -11,8 +11,6 @@ namespace Discord.Rest
[DebuggerDisplay(@"{DebuggerDisplay,nq}")] [DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class RestCategoryChannel : RestGuildChannel, ICategoryChannel public class RestCategoryChannel : RestGuildChannel, ICategoryChannel
{ {
public string Mention => MentionUtils.MentionChannel(Id);

internal RestCategoryChannel(BaseDiscordClient discord, IGuild guild, ulong id) internal RestCategoryChannel(BaseDiscordClient discord, IGuild guild, ulong id)
: base(discord, guild, id) : base(discord, guild, id)
{ {


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

@@ -17,6 +17,9 @@ namespace Discord.WebSocket
public override IReadOnlyCollection<SocketGuildUser> Users public override IReadOnlyCollection<SocketGuildUser> Users
=> Guild.Users.Where(x => x.VoiceChannel?.Id == Id).ToImmutableArray(); => Guild.Users.Where(x => x.VoiceChannel?.Id == Id).ToImmutableArray();


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

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


Loading…
Cancel
Save