really shitty fix of some really shitty shit
This commit is contained in:
parent
11c7c0551d
commit
9a86fe7ee8
19
app.js
19
app.js
@ -48,26 +48,9 @@ client.on('presenceUpdate', (bef, aft) => {
|
|||||||
|
|
||||||
client.on('voiceStateUpdate', (bef, aft) => {
|
client.on('voiceStateUpdate', (bef, aft) => {
|
||||||
if (!aft.channel || !aft.guild.voice || aft.member.user === client.user) return;
|
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.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');
|
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;
|
if (!bef.channel) return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user