mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 14:41:36 +00:00
Voice state update null check
This commit is contained in:
parent
9251fd01ce
commit
d0f2029fa6
2 changed files with 2 additions and 2 deletions
|
|
@ -2114,7 +2114,7 @@ var InternalClient = (function () {
|
|||
client.emit("warn", "voice state update but user or server not in cache");
|
||||
}
|
||||
|
||||
if (user.id === self.user.id) {
|
||||
if (user && user.id === self.user.id) {
|
||||
// only for detecting self user movements for connections.
|
||||
var connection = self.voiceConnections.get("server", server);
|
||||
// existing connection, perhaps channel moved
|
||||
|
|
|
|||
|
|
@ -1824,7 +1824,7 @@ export default class InternalClient {
|
|||
client.emit("warn", "voice state update but user or server not in cache");
|
||||
}
|
||||
|
||||
if (user.id === self.user.id) { // only for detecting self user movements for connections.
|
||||
if (user && user.id === self.user.id) { // 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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue