serverMemberUpdated clarification and crash fix

This commit is contained in:
abalabahaha
2016-05-17 22:31:35 -07:00
parent 43b1cc1d56
commit e1808804c9
3 changed files with 3 additions and 3 deletions

View File

@@ -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