mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
voice: fix #2380 (voiceSessionID null after changing server region)
This commit is contained in:
parent
fa886eaae9
commit
ef138fd3e9
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue