This commit is contained in:
Amish Shah 2017-08-30 12:20:32 +01:00
parent 4e028d713a
commit eb5ba4e45e
No known key found for this signature in database
GPG key ID: 904349C1207D7967

View file

@ -1258,7 +1258,6 @@ class VoiceStateCollection extends Collection {
this.guild = guild;
}
set(id, voiceState) {
super.set(id, voiceState);
const member = this.guild.members.get(id);
if (member) {
if (member.voiceChannel && member.voiceChannel.id !== voiceState.channel_id) {
@ -1268,6 +1267,7 @@ class VoiceStateCollection extends Collection {
const newChannel = this.guild.channels.get(voiceState.channel_id);
if (newChannel) newChannel.members.set(member.user.id, member);
}
super.set(id, voiceState);
}
}