From 6d0c372cd729423411275c96da39cc9e993d435d Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Mon, 24 Jun 2024 18:37:52 -0500 Subject: [PATCH] Fixed memory leak --- webpage/channel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webpage/channel.js b/webpage/channel.js index 17c6f54..18f8aa8 100644 --- a/webpage/channel.js +++ b/webpage/channel.js @@ -556,7 +556,7 @@ class channel{ notititle(message){ return message.author.username+" > "+this.guild.properties.name+" > "+this.name; } - notify(message){ + notify(message,deep=0){ voice.noises(voice.getNotificationSound()); if (!("Notification" in window)) { @@ -585,7 +585,8 @@ class channel{ }) } else if (Notification.permission !== "denied") { Notification.requestPermission().then((permission) => { - this.notify(message); + if(deep===3){return}; + this.notify(message,deep+1); }); } }