diff --git a/app.js b/app.js index 9267c49..ff41136 100644 --- a/app.js +++ b/app.js @@ -48,6 +48,7 @@ client.on('presenceUpdate', (bef, aft) => { client.on('voiceStateUpdate', (bef, aft) => { if (!aft.channel || !aft.guild.voice || aft.member.user === client.user) return; + if (!aft.guild.voice.connection) return; if (aft.mute && !aft.deaf) { const disp = aft.guild.voice.connection.play('./zvuky/neodposlouchavej.ogg'); disp.on('finish', () => aft.setDeaf(true, 'otposlouchávala ta gadza'));