mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Handle incomplete websocket message (#413)
Sometimes the VOICE_SERVER_UPDATE packet will contain a valid guild_id but no token/endpoint.
This commit is contained in:
@@ -375,6 +375,7 @@ var InternalClient = (function () {
|
||||
if (data.d.guild_id !== server.id) return; // ensure it is the right server
|
||||
token = data.d.token;
|
||||
endpoint = data.d.endpoint;
|
||||
if (!token || !endpoint) return;
|
||||
var chan = new _VoiceVoiceConnection2["default"](channel, _this5.client, session, token, server, endpoint);
|
||||
_this5.voiceConnections.add(chan);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user