mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 01:01:30 +00:00
fix #3244
This commit is contained in:
parent
176fc47699
commit
d7f8fd1ae0
1 changed files with 3 additions and 1 deletions
|
|
@ -57,6 +57,8 @@ class Guild extends Base {
|
||||||
*/
|
*/
|
||||||
this.presences = new PresenceStore(this.client);
|
this.presences = new PresenceStore(this.client);
|
||||||
|
|
||||||
|
this.voiceStates = new VoiceStateStore(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the bot has been removed from the guild
|
* Whether the bot has been removed from the guild
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
|
|
@ -307,8 +309,8 @@ class Guild extends Base {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.voiceStates) this.voiceStates = new VoiceStateStore(this);
|
|
||||||
if (data.voice_states) {
|
if (data.voice_states) {
|
||||||
|
this.voiceStates.clear();
|
||||||
for (const voiceState of data.voice_states) {
|
for (const voiceState of data.voice_states) {
|
||||||
this.voiceStates.add(voiceState);
|
this.voiceStates.add(voiceState);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue