mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
serverMemberUpdated clarification and crash fix
This commit is contained in:
@@ -2252,7 +2252,7 @@ var InternalClient = (function () {
|
||||
// only for detecting self user movements for connections.
|
||||
var connection = self.voiceConnections.get("server", server);
|
||||
// existing connection, perhaps channel moved
|
||||
if (connection && connection.voiceChannel.id !== data.channel_id) {
|
||||
if (connection && connection.voiceChannel && connection.voiceChannel.id !== data.channel_id) {
|
||||
// moved, update info
|
||||
connection.voiceChannel = self.channels.get("id", data.channel_id);
|
||||
client.emit("voiceMoved", connection.voiceChannel); // Moved to a new channel
|
||||
|
||||
Reference in New Issue
Block a user