Fixed CachedVoiceChannel.Members
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user