mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
voice: fix #2380 (voiceSessionID null after changing server region)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user