mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
voice state fixes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ class VoiceState extends Base {
|
||||
* @type {Snowflake}
|
||||
*/
|
||||
this.channelID = data.channel_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user