mirror of
https://github.com/danbulant/discord.js
synced 2026-05-29 20:30:38 +00:00
VoiceChannel#members should be a Collection, not an Array
This commit is contained in:
parent
ea764afad2
commit
7968442dbf
1 changed files with 3 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
const GuildChannel = require('./GuildChannel');
|
||||
const { browser } = require('../util/Constants');
|
||||
const Permissions = require('../util/Permissions');
|
||||
const Collection = require('../util/Collection');
|
||||
const { Error } = require('../errors');
|
||||
|
||||
/**
|
||||
|
|
@ -29,9 +30,9 @@ class VoiceChannel extends GuildChannel {
|
|||
* @name VoiceChannel#members
|
||||
*/
|
||||
get members() {
|
||||
return this.guild.voiceStates
|
||||
return new Collection(this.guild.voiceStates
|
||||
.filter(state => state.channelID === this.id && state.member)
|
||||
.map(state => state.member);
|
||||
.map(state => state.member));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue