Better neodposlouchávej
This commit is contained in:
parent
107f456d5d
commit
4ccd7940cf
8
app.js
8
app.js
@ -47,10 +47,12 @@ 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;
|
||||||
if (!aft.guild.voice.connection) return;
|
|
||||||
if (aft.mute && !aft.deaf) {
|
if (aft.mute && !aft.deaf) {
|
||||||
const disp = aft.guild.voice.connection.play('./zvuky/neodposlouchavej.ogg', { volume: 0.38 });
|
if (!aft.guild.voice.connection) aft.setDeaf(true, 'otposlouchávala ta gadza');
|
||||||
disp.on('finish', () => aft.setDeaf(true, 'otposlouchávala ta gadza'));
|
else {
|
||||||
|
aft.guild.voice.connection.play('./zvuky/neodposlouchavej.ogg', { volume: 0.38 })
|
||||||
|
.on('finish', () => {if (aft.mute) aft.setDeaf(true, 'otposlouchávala ta gadza')});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bef.channel) return;
|
if (!bef.channel) return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user