voice state fixes

This commit is contained in:
Amish Shah
2018-08-10 15:15:52 +01:00
parent df54d11dce
commit fe8ece0192
5 changed files with 12 additions and 10 deletions

View File

@@ -233,9 +233,7 @@ class Guild extends Base {
if (!this.voiceStates) this.voiceStates = new VoiceStateStore(this);
if (data.voice_states) {
for (const voiceState of data.voice_states) {
const existing = this.voiceStates.get(voiceState.user_id);
if (existing) existing._patch(voiceState);
else this.voiceStates.add(voiceState);
this.voiceStates.add(voiceState);
}
}