Fixed CachedVoiceChannel.Members

This commit is contained in:
RogueException
2016-06-24 18:06:52 -03:00
parent 31b0085ae3
commit ea5da958b2
2 changed files with 2 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ namespace Discord
}
}
public IReadOnlyCollection<CachedGuildUser> Members => _members.ToReadOnlyCollection();
public IEnumerable<KeyValuePair<ulong, VoiceState>> VoiceStates => _voiceStates;
public CachedGuild(DiscordSocketClient discord, ExtendedModel model, DataStore dataStore) : base(discord, model)
{

View File

@@ -12,7 +12,7 @@ namespace Discord
public new CachedGuild Guild => base.Guild as CachedGuild;
public IReadOnlyCollection<IGuildUser> Members
=> Guild.Members.Where(x => x.VoiceChannel.Id == Id).ToImmutableArray();
=> Guild.VoiceStates.Where(x => x.Value.VoiceChannel.Id == Id).Select(x => Guild.GetUser(x.Key)).ToImmutableArray();
public CachedVoiceChannel(CachedGuild guild, Model model)
: base(guild, model)