From 7968442dbfadb0345cffdd9f57abd3600e735520 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 11 Aug 2018 11:27:34 +0100 Subject: [PATCH] VoiceChannel#members should be a Collection, not an Array --- src/structures/VoiceChannel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index c8b431076..17d1ef502 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -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)); } /**