mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
fix issue with uncached channels and adding members (#1001)
* fix this thing * fix a silly * Update Guild.js
This commit is contained in:
committed by
Schuyler Cebulskie
parent
b74c1b70b6
commit
a0a3989e59
@@ -752,7 +752,11 @@ class Guild {
|
||||
member.selfDeaf = voiceState.self_deaf;
|
||||
member.voiceSessionID = voiceState.session_id;
|
||||
member.voiceChannelID = voiceState.channel_id;
|
||||
this.channels.get(voiceState.channel_id).members.set(member.user.id, member);
|
||||
if (this.client.channels.has(voiceState.channel_id)) {
|
||||
this.client.channels.get(voiceState.channel_id).members.set(member.user.id, member);
|
||||
} else {
|
||||
this.client.emit('warn', `Member ${member.id} added in guild ${this.id} with an uncached voice channel`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user