Fixed memory leak even more
This commit is contained in:
parent
e80ba096c8
commit
2283010ee3
@ -81,7 +81,15 @@ module.exports = (mes, komand, celArgs) => {
|
||||
|
||||
channel.join()
|
||||
.then(con => {
|
||||
if (!timeouty[mes.guild.id]) vypocitatCas(con);
|
||||
if (!timeouty[mes.guild.id]) {
|
||||
vypocitatCas(con);
|
||||
con.on('disconnect', () => {
|
||||
if (timeouty[mes.guild.id]) {
|
||||
clearTimeout(timeouty[mes.guild.id]);
|
||||
delete timeouty[mes.guild.id];
|
||||
}
|
||||
});
|
||||
}
|
||||
con.play('./zvuky/nazdar.ogg');
|
||||
});
|
||||
break;
|
||||
@ -103,8 +111,6 @@ module.exports = (mes, komand, celArgs) => {
|
||||
break;
|
||||
}
|
||||
vojs.channel.leave();
|
||||
clearTimeout(timeouty[mes.guild.id]);
|
||||
delete timeouty[mes.guild.id];
|
||||
mes.react('purfieRIP:644609482843881483');
|
||||
break;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user