voice: fix #2380 (voiceSessionID null after changing server region)

This commit is contained in:
Amish Shah
2018-04-07 15:29:38 +01:00
parent fa886eaae9
commit ef138fd3e9

View File

@@ -69,6 +69,7 @@ class Guild extends Base {
}
}
/* eslint-disable complexity */
/**
* Sets up the guild.
* @param {*} data The raw data of the guild
@@ -210,7 +211,7 @@ class Guild extends Base {
}
}
this.voiceStates = new VoiceStateCollection(this);
if (!this.voiceStates) this.voiceStates = new VoiceStateCollection(this);
if (data.voice_states) {
for (const voiceState of data.voice_states) this.voiceStates.set(voiceState.user_id, voiceState);
}