From 9a86fe7ee837f702321a014374ea33ada52c112d Mon Sep 17 00:00:00 2001 From: Histmy Date: Mon, 11 Jan 2021 23:29:04 +0100 Subject: [PATCH] really shitty fix of some really shitty shit --- app.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/app.js b/app.js index e5c8918..9267c49 100644 --- a/app.js +++ b/app.js @@ -48,26 +48,9 @@ client.on('presenceUpdate', (bef, aft) => { client.on('voiceStateUpdate', (bef, aft) => { if (!aft.channel || !aft.guild.voice || aft.member.user === client.user) return; - - // const vysvetleni = (user, vojs = undefined) => { - // const con = aft.guild.voice.connection; - // const disp = con.play('./zvuky/neodposlouchavej.ogg'); - // disp.on('finish', () => { - // user.setDeaf(true, 'otposlouchávala ta gadza'); - // if (vojs) con.voice.setChannel(vojs); - // }); - // } - if (aft.mute && !aft.deaf) { - // if (aft.guild.voice.channel !== aft.channel) { - // const vojsBack = aft.guild.voice.channel; - // aft.guild.voice.setChannel(aft.channel) - // .then(() => vysvetleni(aft, vojsBack)); - // return; - // } - // vysvetleni(aft); const disp = aft.guild.voice.connection.play('./zvuky/neodposlouchavej.ogg'); - disp.on('finish', () => user.setDeaf(true, 'otposlouchávala ta gadza')); + disp.on('finish', () => aft.setDeaf(true, 'otposlouchávala ta gadza')); } if (!bef.channel) return;