really shitty fix of some really shitty shit

This commit is contained in:
Histmy 2021-01-11 23:29:04 +01:00
parent 11c7c0551d
commit 9a86fe7ee8

19
app.js
View File

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