mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix #3244
This commit is contained in:
@@ -57,6 +57,8 @@ class Guild extends Base {
|
||||
*/
|
||||
this.presences = new PresenceStore(this.client);
|
||||
|
||||
this.voiceStates = new VoiceStateStore(this);
|
||||
|
||||
/**
|
||||
* Whether the bot has been removed from the guild
|
||||
* @type {boolean}
|
||||
@@ -307,8 +309,8 @@ class Guild extends Base {
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.voiceStates) this.voiceStates = new VoiceStateStore(this);
|
||||
if (data.voice_states) {
|
||||
this.voiceStates.clear();
|
||||
for (const voiceState of data.voice_states) {
|
||||
this.voiceStates.add(voiceState);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user